diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-04-28 14:26:46 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-05-04 23:26:40 +0200 |
commit | d8407bba0e48d50fc9d7c9338324a886f74b7d41 (patch) | |
tree | 508f4cdbd704995db5f49fce0c48612d6ae9aa8e /libavfilter/avcodec.c | |
parent | 32094285adea48eb2ad5a23f94fc289ac225a3b7 (diff) | |
download | ffmpeg-d8407bba0e48d50fc9d7c9338324a886f74b7d41.tar.gz |
lavfi/avcodec: implement audio copy_frame_prop.
Diffstat (limited to 'libavfilter/avcodec.c')
-rw-r--r-- | libavfilter/avcodec.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; |