mirror of https://github.com/sipwise/rtpengine.git
fixes #484 Change-Id: Ia7aa9d63e09a90afc2814f0edede480c06ecc53achanges/88/19588/6
parent
14100b0b8a
commit
5a73f12adb
@ -0,0 +1,48 @@
|
||||
include ../lib/lib.Makefile
|
||||
|
||||
all:
|
||||
$(MAKE) $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS) .depend Makefile
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
debug:
|
||||
$(MAKE) DBG=yes all
|
||||
|
||||
dep: .depend
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(TARGET) $(LIBSRCS) .depend core core.*
|
||||
rm -f fix_frame_channel_layout.h fix_frame_channel_layout-test.[co]
|
||||
|
||||
.depend: $(SRCS) $(LIBSRCS) Makefile
|
||||
$(CC) $(CFLAGS) -M $(SRCS) $(LIBSRCS) | sed -e 's/:/ .depend:/' > .depend
|
||||
|
||||
install:
|
||||
|
||||
$(OBJS): Makefile
|
||||
|
||||
$(LIBSRCS):
|
||||
rm -f "$@"
|
||||
echo '/******** GENERATED FILE ********/' > "$@"
|
||||
cat ../lib/"$@" >> "$@"
|
||||
|
||||
resample.c: fix_frame_channel_layout.h
|
||||
|
||||
fix_frame_channel_layout.h: ../lib/fix_frame_channel_layout-*
|
||||
echo "Looking for usable alternative for $@"; \
|
||||
rm -f fix_frame_channel_layout-test.[co]; \
|
||||
ln -s ../lib/fix_frame_channel_layout-test.c; \
|
||||
for x in ../lib/fix_frame_channel_layout-*.h; do \
|
||||
echo "Trying build with $$x"; \
|
||||
rm -f "$@"; \
|
||||
echo '/******** GENERATED FILE ********/' > "$@"; \
|
||||
cat "$$x" >> "$@"; \
|
||||
$(MAKE) fix_frame_channel_layout-test.o 2> /dev/null && break; \
|
||||
echo "Failed build with $$x"; \
|
||||
rm -f "$@"; \
|
||||
done; \
|
||||
rm -f fix_frame_channel_layout-test.[co]; \
|
||||
test -f "$@"
|
||||
|
||||
.PHONY: all debug dep clean install install
|
||||
@ -0,0 +1,9 @@
|
||||
#include <libavutil/frame.h>
|
||||
#include <libavutil/channel_layout.h>
|
||||
#include "compat.h"
|
||||
|
||||
INLINE void fix_frame_channel_layout(AVFrame *frame) {
|
||||
if (frame->channel_layout)
|
||||
return;
|
||||
frame->channel_layout = av_get_default_channel_layout(av_frame_get_channels(frame));
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
#include <libavutil/frame.h>
|
||||
#include <libavutil/channel_layout.h>
|
||||
#include "compat.h"
|
||||
|
||||
INLINE void fix_frame_channel_layout(AVFrame *frame) {
|
||||
if (frame->channel_layout)
|
||||
return;
|
||||
frame->channel_layout = av_get_default_channel_layout(frame->channels);
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
#include "fix_frame_channel_layout.h"
|
||||
void test() {
|
||||
AVFrame *f = NULL;
|
||||
fix_frame_channel_layout(f);
|
||||
}
|
||||
Loading…
Reference in new issue