Message ID | 1637767665-6777-2-git-send-email-lance.lmwang@gmail.com |
---|---|
State | Accepted |
Commit | 05b0c66313abc87505e9298f432476c33588c932 |
Headers | show |
Series | [FFmpeg-devel,v3,1/7] avformat/rtpdec_rfc4175: use rawvideo for uyvy422 | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavformat/rtpdec_rfc4175.c b/libavformat/rtpdec_rfc4175.c index f13736b..5a7058b 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; }