[MPlayer-cvslog] r32823 - trunk/libmpdemux/demuxer.c

reimar subversion at mplayerhq.hu
Thu Jan 27 21:37:51 CET 2011


Author: reimar
Date: Thu Jan 27 21:37:51 2011
New Revision: 32823

Log:
Improve EOF handling in ds_fill_buffer for the case where one stream ends
much earlier than the others, in particular make sure the "too many ..."
message is not printed over and over.

Modified:
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Thu Jan 27 20:34:40 2011	(r32822)
+++ trunk/libmpdemux/demuxer.c	Thu Jan 27 21:37:51 2011	(r32823)
@@ -642,6 +642,8 @@ int ds_fill_buffer(demux_stream_t *ds)
     while (1) {
         if (ds->packs) {
             demux_packet_t *p = ds->first;
+            // obviously not yet EOF after all
+            ds->eof = 0;
 #if 0
             if (demux->reference_clock != MP_NOPTS_VALUE) {
                 if (   p->pts != MP_NOPTS_VALUE
@@ -676,6 +678,9 @@ int ds_fill_buffer(demux_stream_t *ds)
             --ds->packs;
             return 1;
         }
+        // avoid printing the "too many ..." message over and over
+        if (ds->eof)
+            break;
         if (demux->audio->packs >= MAX_PACKS
             || demux->audio->bytes >= MAX_PACK_BYTES) {
             mp_msg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyAudioInBuffer,


More information about the MPlayer-cvslog mailing list