[FFmpeg-cvslog] avformat/utils: move side data merge after parser

Michael Niedermayer git at videolan.org
Thu Nov 21 03:24:53 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 21 00:09:29 2013 +0100| [98fc81b20d6350ba8bb2b3ae936a29bda37d1610] | committer: Michael Niedermayer

avformat/utils: move side data merge after parser

merging before the parser can conflict with the parser, also
future changes depend on it being done later

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98fc81b20d6350ba8bb2b3ae936a29bda37d1610
---

 libavformat/utils.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9522909..bae23a1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -701,9 +701,6 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
             continue;
         }
 
-        if(!(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
-            av_packet_merge_side_data(pkt);
-
         if(pkt->stream_index >= (unsigned)s->nb_streams){
             av_log(s, AV_LOG_ERROR, "Invalid stream index %d\n", pkt->stream_index);
             continue;
@@ -1401,6 +1398,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
     if (!got_packet && s->parse_queue)
         ret = read_from_packet_buffer(&s->parse_queue, &s->parse_queue_end, pkt);
 
+    if(ret >= 0 && !(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
+        av_packet_merge_side_data(pkt);
+
     if(s->debug & FF_FDEBUG_TS)
         av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%s, dts=%s, size=%d, duration=%d, flags=%d\n",
             pkt->stream_index,



More information about the ffmpeg-cvslog mailing list