changeset 1933:eb9eeef16bdb libavformat

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
author gpoirier
date Sun, 18 Mar 2007 23:59:56 +0000
parents 325d25f0cfd3
children aab32293e595
files nutdec.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/nutdec.c	Sun Mar 18 23:29:40 2007 +0000
+++ b/nutdec.c	Sun Mar 18 23:59:56 2007 +0000
@@ -737,13 +737,12 @@
         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++)