aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-11-24 19:05:50 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-11-25 15:04:35 +0800
commit05b0c66313abc87505e9298f432476c33588c932 (patch)
tree6334987bbb0015b0077b9f63af0e1a596067ba7f
parent3399bbab4dcfb8dec3bb1dd238816908791118f3 (diff)
downloadffmpeg-05b0c66313abc87505e9298f432476c33588c932.tar.gz
avformat/rtpdec_rfc4175: support for yuv420p format
Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r--libavformat/rtpdec_rfc4175.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/rtpdec_rfc4175.c b/libavformat/rtpdec_rfc4175.c
index f13736bc3c..5a7058bc14 100644
--- a/libavformat/rtpdec_rfc4175.c
+++ b/libavformat/rtpdec_rfc4175.c
@@ -63,6 +63,17 @@ static int rfc4175_parse_format(AVStream *stream, PayloadContext *data)
} else {
return AVERROR_INVALIDDATA;
}
+ } else if (!strncmp(data->sampling, "YCbCr-4:2:0", 11)) {
+ tag = MKTAG('I', '4', '2', '0');
+ data->xinc = 4;
+
+ if (data->depth == 8) {
+ data->pgroup = 6;
+ pixfmt = AV_PIX_FMT_YUV420P;
+ stream->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
+ } else {
+ return AVERROR_INVALIDDATA;
+ }
} else {
return AVERROR_INVALIDDATA;
}