[Ffmpeg-cvslog] r8447 - trunk/libavformat/nutdec.c

gpoirier subversion
Mon Mar 19 00:59:56 CET 2007


Author: gpoirier
Date: Mon Mar 19 00:59:56 2007
New Revision: 8447

Modified:
   trunk/libavformat/nutdec.c

Log:
fix end-of-file detection
At the end of a nut file, the check for url_feof() fails because the
eof flag was cleared by the url_fseek() call that was used to skip over
the index packet.    This patch fixes this
patch by: Clemens Ladisch % cladisch A fastmail P net %
Original thread:
Date: Feb 27, 2007 6:13 PM
Subject: [Ffmpeg-devel] [PATCH] nutdec: fix end-of-file detection


Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c	(original)
+++ trunk/libavformat/nutdec.c	Mon Mar 19 00:59:56 2007
@@ -737,13 +737,12 @@ static int nut_read_packet(AVFormatConte
         uint64_t tmp= nut->next_startcode;
         nut->next_startcode=0;
 
-        if (url_feof(bc))
-            return -1;
-
         if(tmp){
             pos-=8;
         }else{
             frame_code = get_byte(bc);
+            if(url_feof(bc))
+                return -1;
             if(frame_code == 'N'){
                 tmp= frame_code;
                 for(i=1; i<8; i++)




More information about the ffmpeg-cvslog mailing list