Mercurial > mplayer.hg
changeset 37100:3466f03a5256
Change part of EOF condition into warning message instead.
This avoids hangs in some cases when e.g. audio packets are incomplete.
Based on debugging and patch by Kieran Clancy [clancy.kieran+mplayer gmail.com]
author | reimar |
---|---|
date | Sat, 10 May 2014 19:59:41 +0000 |
parents | 5a59a2cfcc80 |
children | ab6b3fd992dc |
files | mencoder.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mencoder.c Sat May 10 19:59:40 2014 +0000 +++ b/mencoder.c Sat May 10 19:59:41 2014 +0000 @@ -1393,7 +1393,15 @@ } } } - if(len<=0) { if (!mux_a->buffer_len && !sh_audio->a_out_buffer_len && sh_audio->ds->eof) at_eof |= 2; break; } // EOF? + if(len<=0) { + // EOF? + if (!sh_audio->a_out_buffer_len && sh_audio->ds->eof) { + if (mux_a->buffer_len) + mp_msg(MSGT_MENCODER, MSGL_WARN, "Audio data left in buffer at end of file. Probably bug in audio encoder, please report."); + at_eof |= 2; + } + break; + } muxer_write_chunk(mux_a,len,AVIIF_KEYFRAME, MP_NOPTS_VALUE, MP_NOPTS_VALUE); a_muxer_time = adjusted_muxer_time(mux_a); // update after muxing if(!mux_a->h.dwSampleSize && a_muxer_time>0)