mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Fix a crash caused by a null coded_picture pointer in ffserver.
Originally committed as revision 1326 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4e00e76b3c
commit
f694168d52
@ -232,7 +232,7 @@ static int ffm_write_packet(AVFormatContext *s, int stream_index,
|
||||
/* packet size & key_frame */
|
||||
header[0] = stream_index;
|
||||
header[1] = 0;
|
||||
if (st->codec.coded_picture->key_frame)
|
||||
if (st->codec.coded_picture && st->codec.coded_picture->key_frame)
|
||||
header[1] |= FLAG_KEY_FRAME;
|
||||
header[2] = (size >> 16) & 0xff;
|
||||
header[3] = (size >> 8) & 0xff;
|
||||
|
Loading…
Reference in New Issue
Block a user