]> git.sesse.net Git - ffmpeg/commitdiff
avserver: replace av_read_packet with av_read_frame
authorJanne Grunau <janne-libav@jannau.net>
Thu, 25 Oct 2012 14:19:16 +0000 (16:19 +0200)
committerJanne Grunau <janne-libav@jannau.net>
Thu, 15 Nov 2012 17:04:53 +0000 (18:04 +0100)
avserver.c

index 7b38c23dc3b322d417302b781c01fac123cdf932..ad7bc78f0cdeb8da927053db11d122b449332b6e 100644 (file)
@@ -3562,6 +3562,8 @@ static void extract_mpeg4_header(AVFormatContext *infile)
     AVStream *st;
     const uint8_t *p;
 
+    infile->flags |= AVFMT_FLAG_NOFILLIN | AVFMT_FLAG_NOPARSE;
+
     mpeg4_count = 0;
     for(i=0;i<infile->nb_streams;i++) {
         st = infile->streams[i];
@@ -3575,7 +3577,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
 
     printf("MPEG4 without extra data: trying to find header in %s\n", infile->filename);
     while (mpeg4_count > 0) {
-        if (av_read_packet(infile, &pkt) < 0)
+        if (av_read_frame(infile, &pkt) < 0)
             break;
         st = infile->streams[pkt.stream_index];
         if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&