diff options
author | Clemens Ladisch <cladisch@fastmail.net> | 2007-03-18 23:59:56 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-03-18 23:59:56 +0000 |
commit | 559fd1e79524ca47efde195e28feb4499dd48761 (patch) | |
tree | 4f6f46b89370768c3a1a7b8ae14fc8feb7c71deb | |
parent | c06136e02417098b45e447ef665ee2cc72a60a4a (diff) | |
download | ffmpeg-559fd1e79524ca47efde195e28feb4499dd48761.tar.gz |
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
Originally committed as revision 8447 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nutdec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index ec1c04e0f9..c0f331c27c 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -737,13 +737,12 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt) 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++) |