[FFmpeg-cvslog] sdp: Fix null pointer dereference with aac and ffserver.

Carl git at videolan.org
Mon Nov 28 04:30:02 CET 2011


ffmpeg | branch: master | Carl <cmastrange3 at gatech.edu> | Mon Nov 28 04:22:11 2011 +0100| [2cf4bd7751c1920c840a3afc6dce39535def47f2] | committer: Michael Niedermayer

sdp: Fix null pointer dereference with aac and ffserver.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2cf4bd7751c1920c840a3afc6dce39535def47f2
---

 libavformat/sdp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 37eee26..13c5ba6 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,
                                      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)



More information about the ffmpeg-cvslog mailing list