mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-19 23:26:14 +08:00
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:
@@ -74,6 +74,26 @@ static int rfc4175_parse_format(AVStream *stream, PayloadContext *data)
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else if (!strncmp(data->sampling, "RGB", 3)) {
|
||||
tag = MKTAG('R', 'G', 'B', 24);
|
||||
if (data->depth == 8) {
|
||||
data->xinc = 1;
|
||||
data->pgroup = 3;
|
||||
pixfmt = AV_PIX_FMT_RGB24;
|
||||
stream->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else if (!strncmp(data->sampling, "BGR", 3)) {
|
||||
tag = MKTAG('B', 'G', 'R', 24);
|
||||
if (data->depth == 8) {
|
||||
data->xinc = 1;
|
||||
data->pgroup = 3;
|
||||
pixfmt = AV_PIX_FMT_BGR24;
|
||||
stream->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Reference in New Issue
Block a user