[FFmpeg-devel] [PATCH]Check pointer to oformat in sdp before using it
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Dec 9 17:29:43 CET 2012
Hi!
Attached patch fixes ticket #1986 for me.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index cdc3e21..3b9079c 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) {
More information about the ffmpeg-devel
mailing list