diff options
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/Makefile | 12 | ||||
-rw-r--r-- | libavfilter/avcodec.c | 5 | ||||
-rw-r--r-- | libavfilter/avfilter.c | 12 | ||||
-rw-r--r-- | libavfilter/avfilter.h | 13 | ||||
-rw-r--r-- | libavfilter/formats.c | 3 | ||||
-rw-r--r-- | libavfilter/version.h | 2 |
6 files changed, 29 insertions, 18 deletions
diff --git a/libavfilter/Makefile b/libavfilter/Makefile index e7ed1a5250..7da07eb76a 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -11,7 +11,14 @@ FFLIBS-$(CONFIG_PAN_FILTER) += swresample FFLIBS-$(CONFIG_REMOVELOGO_FILTER) += avformat avcodec FFLIBS-$(CONFIG_MP_FILTER) += avcodec postproc -HEADERS = asrc_abuffer.h avcodec.h avfilter.h avfiltergraph.h buffersink.h buffersrc.h version.h vsrc_buffer.h +HEADERS = asrc_abuffer.h \ + avcodec.h \ + avfilter.h \ + avfiltergraph.h \ + buffersink.h \ + buffersrc.h \ + version.h \ + vsrc_buffer.h \ OBJS = allfilters.o \ avfilter.o \ @@ -171,4 +178,5 @@ OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/pullup.o TESTPROGS = drawutils formats -TOOLS = graph2dot lavfi-showfiltfmts +TOOLS = graph2dot \ + lavfi-showfiltfmts \ diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c index 850e21a546..a63c2a3c95 100644 --- a/libavfilter/avcodec.c +++ b/libavfilter/avcodec.c @@ -41,10 +41,11 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) dst->video->pict_type = src->pict_type; break; case AVMEDIA_TYPE_AUDIO: - dst->audio->sample_rate = av_frame_get_sample_rate(src); + dst->audio->sample_rate = src->sample_rate; + dst->audio->channel_layout = src->channel_layout; break; default: - return AVERROR(ENOSYS); + return AVERROR(EINVAL); } return 0; diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index d71ffdc620..99b97dfc5c 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -901,3 +901,15 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque return ret; } +void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src) +{ + // copy common properties + dst->pts = src->pts; + dst->pos = src->pos; + + switch (src->type) { + case AVMEDIA_TYPE_VIDEO: *dst->video = *src->video; break; + case AVMEDIA_TYPE_AUDIO: *dst->audio = *src->audio; break; + default: break; + } +} diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index ae296cbef3..c526df4a9f 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -155,18 +155,7 @@ typedef struct AVFilterBufferRef { /** * Copy properties of src to dst, without copying the actual data */ -static inline void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src) -{ - // copy common properties - dst->pts = src->pts; - dst->pos = src->pos; - - switch (src->type) { - case AVMEDIA_TYPE_VIDEO: *dst->video = *src->video; break; - case AVMEDIA_TYPE_AUDIO: *dst->audio = *src->audio; break; - default: break; - } -} +void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src); /** * Add a new reference to a buffer. diff --git a/libavfilter/formats.c b/libavfilter/formats.c index c52c79dd26..569178fca8 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -47,7 +47,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) AVFilterFormats *ret; unsigned i, j, k = 0; - if (a == b) return a; + if (a == b) + return a; ret = av_mallocz(sizeof(*ret)); diff --git a/libavfilter/version.h b/libavfilter/version.h index c9da0c57f7..1aee0374fe 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #define LIBAVFILTER_VERSION_MAJOR 2 #define LIBAVFILTER_VERSION_MINOR 72 -#define LIBAVFILTER_VERSION_MICRO 104 +#define LIBAVFILTER_VERSION_MICRO 105 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ |