[vlc-commits] codec: spudec: fix unsized region regression (fix #17757)
Francois Cartegnie
git at videolan.org
Sat Dec 10 11:11:54 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec 10 11:10:20 2016 +0100| [ddea6f6c3ae69ee50a668b8c3b0c4271fde00213] | committer: Francois Cartegnie
codec: spudec: fix unsized region regression (fix #17757)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ddea6f6c3ae69ee50a668b8c3b0c4271fde00213
---
modules/codec/spudec/parse.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/spudec/parse.c b/modules/codec/spudec/parse.c
index 383c6df..9ea200f 100644
--- a/modules/codec/spudec/parse.c
+++ b/modules/codec/spudec/parse.c
@@ -710,10 +710,10 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
}
p_spu->p_region = subpicture_region_New( &fmt );
- fmt.p_palette = NULL;
- video_format_Clean( &fmt );
if( !p_spu->p_region )
{
+ fmt.p_palette = NULL;
+ video_format_Clean( &fmt );
msg_Err( p_dec, "cannot allocate SPU region" );
return;
}
@@ -735,4 +735,7 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
memset( p_p + i_x + i_y, i_color, i_len );
}
}
+
+ fmt.p_palette = NULL;
+ video_format_Clean( &fmt );
}
More information about the vlc-commits
mailing list