Merge commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4'
* commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4': sdp: Check theora colorspace before producing the configuration string See: db8a53d86a71c948bd41dd12d1ff1d3351ec2746 Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
09c13ff7bd
@ -513,13 +513,6 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
|
|||||||
break;
|
break;
|
||||||
case AV_CODEC_ID_THEORA: {
|
case AV_CODEC_ID_THEORA: {
|
||||||
const char *pix_fmt;
|
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) {
|
switch (c->pix_fmt) {
|
||||||
case AV_PIX_FMT_YUV420P:
|
case AV_PIX_FMT_YUV420P:
|
||||||
pix_fmt = "YCbCr-4:2:0";
|
pix_fmt = "YCbCr-4:2:0";
|
||||||
@ -532,10 +525,16 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(c, AV_LOG_ERROR, "Unsupported pixel format.\n");
|
av_log(c, AV_LOG_ERROR, "Unsupported pixel format.\n");
|
||||||
av_free(config);
|
|
||||||
return NULL;
|
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"
|
av_strlcatf(buff, size, "a=rtpmap:%d theora/90000\r\n"
|
||||||
"a=fmtp:%d delivery-method=inline; "
|
"a=fmtp:%d delivery-method=inline; "
|
||||||
"width=%d; height=%d; sampling=%s; "
|
"width=%d; height=%d; sampling=%s; "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user