You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/flvdec: support demux av1 in enhanced flv
Tested-by: Tristan Matthews <tmatth@videolan.org> Tested-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Tristan Matthews <tmatth@videolan.org> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
@@ -318,6 +318,8 @@ static int flv_same_video_codec(AVFormatContext *s, AVCodecParameters *vpar, int
|
|||||||
switch(codec_id) {
|
switch(codec_id) {
|
||||||
case MKBETAG('h', 'v', 'c', '1'):
|
case MKBETAG('h', 'v', 'c', '1'):
|
||||||
return vpar->codec_id == AV_CODEC_ID_HEVC;
|
return vpar->codec_id == AV_CODEC_ID_HEVC;
|
||||||
|
case MKBETAG('a', 'v', '0', '1'):
|
||||||
|
return vpar->codec_id == AV_CODEC_ID_AV1;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -359,6 +361,10 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream,
|
|||||||
par->codec_id = AV_CODEC_ID_HEVC;
|
par->codec_id = AV_CODEC_ID_HEVC;
|
||||||
vstreami->need_parsing = AVSTREAM_PARSE_HEADERS;
|
vstreami->need_parsing = AVSTREAM_PARSE_HEADERS;
|
||||||
return 4;
|
return 4;
|
||||||
|
case MKBETAG('a', 'v', '0', '1'):
|
||||||
|
par->codec_id = AV_CODEC_ID_AV1;
|
||||||
|
vstreami->need_parsing = AVSTREAM_PARSE_HEADERS;
|
||||||
|
return 4;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1278,7 +1284,8 @@ retry_duration:
|
|||||||
if (st->codecpar->codec_id == AV_CODEC_ID_AAC ||
|
if (st->codecpar->codec_id == AV_CODEC_ID_AAC ||
|
||||||
st->codecpar->codec_id == AV_CODEC_ID_H264 ||
|
st->codecpar->codec_id == AV_CODEC_ID_H264 ||
|
||||||
st->codecpar->codec_id == AV_CODEC_ID_MPEG4 ||
|
st->codecpar->codec_id == AV_CODEC_ID_MPEG4 ||
|
||||||
st->codecpar->codec_id == AV_CODEC_ID_HEVC) {
|
st->codecpar->codec_id == AV_CODEC_ID_HEVC ||
|
||||||
|
st->codecpar->codec_id == AV_CODEC_ID_AV1) {
|
||||||
int type = 0;
|
int type = 0;
|
||||||
if (flv->exheader && stream_type == FLV_STREAM_TYPE_VIDEO) {
|
if (flv->exheader && stream_type == FLV_STREAM_TYPE_VIDEO) {
|
||||||
type = flags & 0x0F;
|
type = flags & 0x0F;
|
||||||
@@ -1309,7 +1316,8 @@ retry_duration:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == 0 && (!st->codecpar->extradata || st->codecpar->codec_id == AV_CODEC_ID_AAC ||
|
if (type == 0 && (!st->codecpar->extradata || st->codecpar->codec_id == AV_CODEC_ID_AAC ||
|
||||||
st->codecpar->codec_id == AV_CODEC_ID_H264 || st->codecpar->codec_id == AV_CODEC_ID_HEVC)) {
|
st->codecpar->codec_id == AV_CODEC_ID_H264 || st->codecpar->codec_id == AV_CODEC_ID_HEVC ||
|
||||||
|
st->codecpar->codec_id == AV_CODEC_ID_AV1)) {
|
||||||
AVDictionaryEntry *t;
|
AVDictionaryEntry *t;
|
||||||
|
|
||||||
if (st->codecpar->extradata) {
|
if (st->codecpar->extradata) {
|
||||||
|
Reference in New Issue
Block a user