[FFmpeg-cvslog] avformat/rtpdec_rfc4175: support for yuv420p format

Limin Wang git at videolan.org
Thu Nov 25 12:19:50 EET 2021


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Wed Nov 24 19:05:50 2021 +0800| [05b0c66313abc87505e9298f432476c33588c932] | committer: Limin Wang

avformat/rtpdec_rfc4175: support for yuv420p format

Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

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

 libavformat/rtpdec_rfc4175.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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;
     }



More information about the ffmpeg-cvslog mailing list