[FFmpeg-cvslog] lavfi/avcodec: implement audio copy_frame_prop.
Nicolas George
git at videolan.org
Fri May 4 23:46:07 CEST 2012
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Apr 28 14:26:46 2012 +0200| [d8407bba0e48d50fc9d7c9338324a886f74b7d41] | committer: Nicolas George
lavfi/avcodec: implement audio copy_frame_prop.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8407bba0e48d50fc9d7c9338324a886f74b7d41
---
libavfilter/avcodec.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index e5f2bc3..850e21a 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;
More information about the ffmpeg-cvslog
mailing list