avformat/rtp: support RGB/BGR for rfc4175

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang
2021-11-24 19:14:17 +08:00
parent 7b55f95f71
commit 522f577d7e
3 changed files with 34 additions and 0 deletions

View File

@@ -676,6 +676,12 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int
case AV_PIX_FMT_YUV420P:
pix_fmt = "YCbCr-4:2:0";
break;
case AV_PIX_FMT_RGB24:
pix_fmt = "RGB";
break;
case AV_PIX_FMT_BGR24:
pix_fmt = "BGR";
break;
default:
av_log(fmt, AV_LOG_ERROR, "Unsupported pixel format.\n");
return NULL;