[MPlayer-dev-eng] [PATCH] fix unsafe 'switch_audio' property

Mathieu SCHROETER mathieu.schroeter at gamesover.ch
Mon Aug 4 12:52:47 CEST 2008


Like the properties 'chapter' and 'angle' (patchs sent to this
list on 2008.07.13), the property 'switch_audio' is unsafe with

to reproduce the segv (for example):

   $mplayer -idle -slave
    set_property switch_audio 1


   Program received signal SIGSEGV, Segmentation fault.
   [Switching to Thread 0x7fc396b477e0 (LWP 31171)]
   0x000000000047348d in mp_property_audio (prop=<value optimized out>,
   action=<value optimized out>, arg=0x10b89b0, mpctx=0xdd1120) at
   842		current_id = mpctx->demuxer->audio->id;

Because mpctx->demuxer is NULL..

This patch will fix the segv..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: secure_property_switch_audio.patch
Type: text/x-patch
Size: 363 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080804/dd9d29fd/attachment.bin>

More information about the MPlayer-dev-eng mailing list