From d8407bba0e48d50fc9d7c9338324a886f74b7d41 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sat, 28 Apr 2012 14:26:46 +0200 Subject: [PATCH] lavfi/avcodec: implement audio copy_frame_prop. --- libavfilter/avcodec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c index e5f2bc3c53..850e21a546 100644 --- a/libavfilter/avcodec.c +++ b/libavfilter/avcodec.c @@ -22,6 +22,7 @@ */ #include "avcodec.h" +#include "libavutil/opt.h" int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) { @@ -38,6 +39,12 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) dst->video->top_field_first = src->top_field_first; dst->video->key_frame = src->key_frame; dst->video->pict_type = src->pict_type; + break; + case AVMEDIA_TYPE_AUDIO: + dst->audio->sample_rate = av_frame_get_sample_rate(src); + break; + default: + return AVERROR(ENOSYS); } return 0;