Move the codec_id overriding at a slightly better place.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 14 Jul 2008 20:31:17 +0000 (20:31 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 14 Jul 2008 20:31:17 +0000 (20:31 +0000)
Originally committed as revision 14234 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index 851df6b..02ab108 100644 (file)
@@ -563,11 +563,6 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
             return ret;
         st= s->streams[pkt->stream_index];
 
-        if(!pktl && st->codec->codec_id!=CODEC_ID_PROBE)
-            return ret;
-
-        add_to_pktbuf(&s->raw_packet_buffer, pkt);
-
         switch(st->codec->codec_type){
         case CODEC_TYPE_VIDEO:
             if(s->video_codec_id)   st->codec->codec_id= s->video_codec_id;
@@ -580,6 +575,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
             break;
         }
 
+        if(!pktl && st->codec->codec_id!=CODEC_ID_PROBE)
+            return ret;
+
+        add_to_pktbuf(&s->raw_packet_buffer, pkt);
+
         if(st->codec->codec_id == CODEC_ID_PROBE){
             AVProbeData *pd = &st->probe_data;