From f6a7f440c7ca4d15f08246d4919783dd4247bf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marian=20=C4=8Eurkovi=C4=8D?= Date: Tue, 8 Sep 2009 12:03:19 +0200 Subject: [PATCH] Revert "Fix demuxdump to work with RTP input ..." This reverts commit 8f9391f621f409375238c9967f3e264ebba38637. (The root cause for this problem was fixed in commit 494826773c6938e3a87b12b1026c8b53c73a01a0) --- modules/demux/demuxdump.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/demux/demuxdump.c b/modules/demux/demuxdump.c index 0a97bf45b6..340457707e 100644 --- a/modules/demux/demuxdump.c +++ b/modules/demux/demuxdump.c @@ -77,6 +77,8 @@ struct demux_sys_t char *psz_file; FILE *p_file; uint64_t i_write; + + uint8_t buffer[DUMP_BLOCKSIZE]; }; /* @@ -171,14 +173,14 @@ static int Demux( demux_t *p_demux ) { demux_sys_t *p_sys = p_demux->p_sys; - const uint8_t *p_peek; int i_data; - i_data = stream_Peek( p_demux->s, &p_peek, DUMP_BLOCKSIZE ); + /* I'm pretty sure that stream_Peek,stream_Read( , NULL ) would be faster*/ + i_data = stream_Read( p_demux->s, p_sys->buffer, DUMP_BLOCKSIZE ); if ( i_data <= 0 ) return i_data; - i_data = fwrite( p_peek, 1, i_data, p_sys->p_file ); + i_data = fwrite( p_sys->buffer, 1, i_data, p_sys->p_file ); if( i_data == 0 ) { @@ -189,7 +191,6 @@ static int Demux( demux_t *p_demux ) msg_Dbg( p_demux, "dumped %d bytes", i_data ); #endif - stream_Read( p_demux->s, NULL, i_data ); p_sys->i_write += i_data; return 1; -- GitLab