summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorWolfram Gloger <wmglo@dent.med.uni-muenchen.de>2007-04-30 09:46:11 +0000
committerDiego Biurrun <diego@biurrun.de>2007-04-30 09:46:11 +0000
commit7af636d44ae549cf6848da9f5656f88b7303eb90 (patch)
treee1827d90c11a23aa48a40ce73568a9bb662c396f /libavformat/mpeg.c
parent268fc08290a0d55461d11d81ec2244c26047480d (diff)
Fix loop condition so it can be run through more than once.
patch by Wolfram Gloger, wmglo dent.med.uni-muenchen de reference: [Ffmpeg-devel] buffer underflow messages from the output_example.c Originally committed as revision 8860 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index b2a98221cd..d30fc53fc9 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -1028,9 +1028,10 @@ static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){
for(i=0; i<ctx->nb_streams; i++){
AVStream *st = ctx->streams[i];
StreamInfo *stream = st->priv_data;
- PacketDesc *pkt_desc= stream->predecode_packet;
+ PacketDesc *pkt_desc;
- while(pkt_desc && scr > pkt_desc->dts){ //FIXME > vs >=
+ while((pkt_desc= stream->predecode_packet)
+ && scr > pkt_desc->dts){ //FIXME > vs >=
if(stream->buffer_index < pkt_desc->size ||
stream->predecode_packet == stream->premux_packet){
av_log(ctx, AV_LOG_ERROR,