1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-13 18:36:09 +00:00

Prevent segfault if video codec init fails

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20515 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtogni 2006-10-29 14:26:23 +00:00
parent fbe914dc00
commit 54abc1a05e

View File

@ -571,6 +571,10 @@ static int demux_real_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds)
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) */