diff options
author | Martin Storsjö <martin@martin.st> | 2014-01-03 15:47:02 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-01-05 01:33:46 +0200 |
commit | 82b9799bb211ecd117171115e4a8b832c4942314 (patch) | |
tree | 95db997545676cb4e68fe1349c1f21e6a605b22f /libavformat | |
parent | 9d18a7d3ec09d6d933d648570643fde924aa391a (diff) | |
download | ffmpeg-streaming-82b9799bb211ecd117171115e4a8b832c4942314.zip ffmpeg-streaming-82b9799bb211ecd117171115e4a8b832c4942314.tar.gz |
sdp: Check that fmt->oformat is non-null before accessing it
This avoids crashes when avserver tries to create an SDP, since
d77f4af.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/sdp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index ec7e2f4..895b9d6 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -402,7 +402,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, switch (c->codec_id) { case AV_CODEC_ID_H264: { int mode = 1; - if (fmt && fmt->oformat->priv_class && + if (fmt && fmt->oformat && fmt->oformat->priv_class && av_opt_flag_is_set(fmt->priv_data, "rtpflags", "h264_mode0")) mode = 0; if (c->extradata_size) { |