[vlc-devel] commit: Output a gathered picture before parsing the next SPS/PPS. ( Laurent Aimar )
git version control
git at videolan.org
Fri Jul 25 23:32:04 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jul 25 22:38:20 2008 +0200| [dc7fd05268188305cbddc6af337bcbfc81ad4705]
Output a gathered picture before parsing the next SPS/PPS.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc7fd05268188305cbddc6af337bcbfc81ad4705
---
modules/packetizer/h264.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 6681a42..3a37e1f 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -732,6 +732,9 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
bs_t s;
int i_tmp;
+ if( p_sys->b_slice )
+ p_pic = OutputPicture( p_dec );
+
if( !p_sys->b_sps ) msg_Dbg( p_dec, "found NAL_SPS" );
p_sys->b_sps = true;
@@ -846,9 +849,6 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
free( dec );
- if( p_sys->b_slice )
- p_pic = OutputPicture( p_dec );
-
/* We have a new SPS */
if( p_sys->p_sps ) block_Release( p_sys->p_sps );
p_sys->p_sps = p_frag;
@@ -860,6 +860,9 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
{
bs_t s;
+ if( p_sys->b_slice )
+ p_pic = OutputPicture( p_dec );
+
bs_init( &s, &p_frag->p_buffer[5], p_frag->i_buffer - 5 );
bs_read_ue( &s ); // pps id
bs_read_ue( &s ); // sps id
@@ -871,9 +874,6 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
/* TODO */
- if( p_sys->b_slice )
- p_pic = OutputPicture( p_dec );
-
/* We have a new PPS */
if( p_sys->p_pps ) block_Release( p_sys->p_pps );
p_sys->p_pps = p_frag;
More information about the vlc-devel
mailing list