[vlc-devel] commit: Fixed seeking in mpeg1 files with libmpeg2 decoder (close #2953). ( Laurent Aimar )
git version control
git at videolan.org
Sat Jul 11 19:14:43 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jul 11 18:55:43 2009 +0200| [4746e4bc4a38930784e04110477e51502d568af7] | committer: Laurent Aimar
Fixed seeking in mpeg1 files with libmpeg2 decoder (close #2953).
mpeg1 files may have only one sequence header.
It can be backported to 1.0 only after being carefully tested.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4746e4bc4a38930784e04110477e51502d568af7
---
modules/codec/libmpeg2.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index 7d24de4..2c41e35 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -395,8 +395,14 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( !p_pic )
{
Reset( p_dec );
- block_Release( p_block );
- return NULL;
+
+ p_pic = DpbNewPicture( p_dec );
+ if( !p_pic )
+ {
+ mpeg2_reset( p_sys->p_mpeg2dec, 1 );
+ block_Release( p_block );
+ return NULL;
+ }
}
}
@@ -614,7 +620,7 @@ static void Reset( decoder_t *p_dec )
decoder_sys_t *p_sys = p_dec->p_sys;
cc_Flush( &p_sys->cc );
- mpeg2_reset( p_sys->p_mpeg2dec, p_sys->p_info->sequence != NULL );
+ mpeg2_reset( p_sys->p_mpeg2dec, 0 );
DpbClean( p_dec );
}
More information about the vlc-devel
mailing list