summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-15 13:25:56 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-15 13:25:56 +0000
commit544a3061472e1a3590a26fbcc2de72ecb03134fb (patch)
tree03268666e20db62f6507c35ce65d372f169c3f8b /libmpdemux
parentb03ca2821f8feb41770c5c307395ac03e42c212f (diff)
downloadmpv-544a3061472e1a3590a26fbcc2de72ecb03134fb.tar.bz2
mpv-544a3061472e1a3590a26fbcc2de72ecb03134fb.tar.xz
Avoid one more code duplication
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24527 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ty.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c
index b219af7b3f..38f5b1877b 100644
--- a/libmpdemux/demux_ty.c
+++ b/libmpdemux/demux_ty.c
@@ -465,6 +465,7 @@ static int demux_ty_fill_buffer( demuxer_t *demux, demux_stream_t *dsds )
return 0;
}
+ do {
if ( tivo->tmf != 1 )
{
// Make sure we are on a 128k boundary
@@ -489,25 +490,10 @@ static int demux_ty_fill_buffer( demuxer_t *demux, demux_stream_t *dsds )
return 0;
tivo->whichChunk++;
}
-
- // We found a part header, skip it
- if( AV_RB32(chunk) == TIVO_PES_FILEID )
- {
+ if (AV_RB32(chunk) == TIVO_PES_FILEID)
mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Skipping PART Header\n" );
- if ( tivo->tmf != 1 )
- {
- demux->filepos = stream_tell( demux->stream );
- readSize = stream_read( demux->stream, chunk, CHUNKSIZE );
- }
- else
- {
- readSize = tmf_load_chunk( demux, tivo, chunk, tivo->whichChunk );
- tivo->whichChunk++;
- }
+ } while (AV_RB32(chunk) == TIVO_PES_FILEID);
- if ( readSize != CHUNKSIZE )
- return 0;
- }
mp_msg( MSGT_DEMUX, MSGL_DBG3,
"\nty:actual current offset %"PRIx64"\n", stream_tell( demux->stream ) -
CHUNKSIZE );