[vlc-devel] [PATCH 2/8] codec/schroedinger: handle cases where schro invents a placeholder pic

davidf+nntp at woaf.net davidf+nntp at woaf.net
Fri Mar 27 21:37:51 CET 2009


From: David Flynn <davidf at rd.bbc.co.uk>


Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
 modules/codec/schroedinger.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index 4bb392a..1f39df1 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -528,6 +528,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         case SCHRO_DECODER_OK:
             u_pnum = schro_decoder_get_picture_number( p_sys->p_schro );
             p_schroframe = schro_decoder_pull( p_sys->p_schro );
+            if( !p_schroframe->priv )
+            {
+                schro_frame_unref( p_schroframe );
+                break;
+            }
             p_pic = ((struct picture_free_t*) p_schroframe->priv)->p_pic;
             p_schroframe->priv = NULL;
             schro_frame_unref( p_schroframe );
-- 
1.5.6.5




More information about the vlc-devel mailing list