diff options
Diffstat (limited to 'chromium/third_party/ffmpeg/libavformat/sdp.c')
-rw-r--r-- | chromium/third_party/ffmpeg/libavformat/sdp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/chromium/third_party/ffmpeg/libavformat/sdp.c b/chromium/third_party/ffmpeg/libavformat/sdp.c index 01242184958..c53de905171 100644 --- a/chromium/third_party/ffmpeg/libavformat/sdp.c +++ b/chromium/third_party/ffmpeg/libavformat/sdp.c @@ -217,7 +217,7 @@ static char *extradata2psets(AVCodecContext *c) sps_end = r1; } if (av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r) == NULL) { - av_log(c, AV_LOG_ERROR, "Cannot Base64-encode %td %td!\n", MAX_PSET_SIZE - (p - psets), r1 - r); + av_log(c, AV_LOG_ERROR, "Cannot Base64-encode %"PTRDIFF_SPECIFIER" %"PTRDIFF_SPECIFIER"!\n", MAX_PSET_SIZE - (p - psets), r1 - r); av_free(psets); return NULL; @@ -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) { @@ -513,13 +513,6 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, break; case AV_CODEC_ID_THEORA: { const char *pix_fmt; - if (c->extradata_size) - config = xiph_extradata2config(c); - else - av_log(c, AV_LOG_ERROR, "Theora configuation info missing\n"); - if (!config) - return NULL; - switch (c->pix_fmt) { case AV_PIX_FMT_YUV420P: pix_fmt = "YCbCr-4:2:0"; @@ -535,6 +528,13 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, return NULL; } + if (c->extradata_size) + config = xiph_extradata2config(c); + else + av_log(c, AV_LOG_ERROR, "Theora configuation info missing\n"); + if (!config) + return NULL; + av_strlcatf(buff, size, "a=rtpmap:%d theora/90000\r\n" "a=fmtp:%d delivery-method=inline; " "width=%d; height=%d; sampling=%s; " |