Mercurial > mplayer.hg
changeset 20499:2d274de63b54
Prevent segfault if video codec init fails
author | rtogni |
---|---|
date | Sun, 29 Oct 2006 14:26:23 +0000 |
parents | 1815baeb723d |
children | 9fa6073f0bde |
files | libmpdemux/demux_real.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_real.c Sun Oct 29 14:16:42 2006 +0000 +++ b/libmpdemux/demux_real.c Sun Oct 29 14:26:23 2006 +0000 @@ -571,6 +571,10 @@ int x, sps, cfs, sph, spc, w; int audioreorder_getnextpk = 0; + // Don't demux video if video codec init failed + if (demuxer->video->id >= 0 && !demuxer->video->sh) + demuxer->video->id = -2; + while(!stream_eof(demuxer->stream)){ /* Handle audio/video demxing switch for multirate files (non-interleaved) */