[vlc-devel] [PATCH] More or less backport [eead487527d6a65897e23031bd2fefbd5122e250].

Alexis Ballier aballier at gentoo.org
Sat May 9 18:32:52 CEST 2009


This fixes a segfault with http://dirac.kw.bbc.co.uk/download/video/maybefinal/bbb-tr1000.ts
cf https://bugs.gentoo.org/show_bug.cgi?id=267790
---
 modules/codec/schroedinger.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index b89e7df..4dc17b7 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -528,6 +528,13 @@ 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 || !p_schroframe->priv )
+            {
+                /* frame can't be one that was allocated by us
+                 *   -- no private data: discard */
+                if( p_schroframe ) 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.6.3




More information about the vlc-devel mailing list