[FFmpeg-devel] [PATCH 10/13] lavfi/avcodec: implement audio copy_frame_prop.

Nicolas George nicolas.george at normalesup.org
Sat Apr 28 16:31:52 CEST 2012


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavfilter/avcodec.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index 4702461..506b988 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -38,6 +38,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         = src->sample_rate;
+        break;
+    default:
+        return AVERROR(ENOSYS);
     }
 
     return 0;
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list