sdp: Fix null pointer dereference with aac and ffserver.
authorCarl <cmastrange3@gatech.edu>
Mon, 28 Nov 2011 03:22:11 +0000 (04:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Nov 2011 03:29:47 +0000 (04:29 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/sdp.c

index 37eee26..13c5ba6 100644 (file)
@@ -402,7 +402,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
                                      payload_type, config ? config : "");
             break;
         case CODEC_ID_AAC:
-            if (fmt && fmt->oformat->priv_class &&
+            if (fmt && fmt->oformat && fmt->oformat->priv_class &&
                 av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) {
                 config = latm_context2config(c);
                 if (!config)