[FFmpeg-cvslog] avserver: replace av_read_packet with av_read_frame

Janne Grunau git at videolan.org
Fri Nov 16 13:36:40 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Thu Oct 25 16:19:16 2012 +0200| [566de8cde29d999fd05c477158adbd580b8522c7] | committer: Janne Grunau

avserver: replace av_read_packet with av_read_frame

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

 avserver.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/avserver.c b/avserver.c
index 7b38c23..ad7bc78 100644
--- a/avserver.c
+++ b/avserver.c
@@ -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 &&



More information about the ffmpeg-cvslog mailing list