Commit 7af636d4 authored by Wolfram Gloger's avatar Wolfram Gloger Committed by Diego Biurrun

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
parent 268fc082
...@@ -1028,9 +1028,10 @@ static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){ ...@@ -1028,9 +1028,10 @@ static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){
for(i=0; i<ctx->nb_streams; i++){ for(i=0; i<ctx->nb_streams; i++){
AVStream *st = ctx->streams[i]; AVStream *st = ctx->streams[i];
StreamInfo *stream = st->priv_data; 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 || if(stream->buffer_index < pkt_desc->size ||
stream->predecode_packet == stream->premux_packet){ stream->predecode_packet == stream->premux_packet){
av_log(ctx, AV_LOG_ERROR, av_log(ctx, AV_LOG_ERROR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment