Web lists-archives.org

[MPlayer-dev-eng] [PATCH] Null pointer reference in ad_liba52.c:62




This patch has also been submitted to Bugzilla:
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1089

I'm running the latest svn on x86_64 Hardy Heron. When attempting to
play an HD-DVD rip, mplayer crashes with a segmentation fault at
libmpcodecs/ad_liba52.c:62.

62              int c=demux_getc(sh_audio->ds);

(gdb) print sh_audio->ds
$4 = (demux_stream_t *) 0x0

See the Bugzilla bug for the complete backtrace. sh_audio->ds isn't
getting initialized before the first call to reinit_audio_chain() in
mplayer.c.

--
Ryan Steele - rgsteele@xxxxxxxxx
Index: mplayer.c
===================================================================
--- mplayer.c    (revision 26877) 
+++ mplayer.c    (working copy) 
@@ -3577,6 +3577,7 @@
 //================ SETUP AUDIO ==========================
 
 if(mpctx->sh_audio){
+  mpctx->sh_audio->ds = mpctx->d_audio; 
   reinit_audio_chain();
   if (mpctx->sh_audio && mpctx->sh_audio->codec)
     mp_msg(MSGT_IDENTIFY,MSGL_INFO, "ID_AUDIO_CODEC=%s\n", mpctx->sh_audio->codec->name);
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng