diff options
author | Nicolas George <george@nsup.org> | 2021-08-31 19:36:35 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2021-09-16 10:17:59 +0200 |
commit | 94aa7e8a764b2136cafe43f296a6e41a6b0a14ed (patch) | |
tree | 54b575f06884a3be5ee30a1114255478d71f0ef4 /libavformat/concatdec.c | |
parent | 5b052c4bcbf711b418ca6991799764dfe7ae6163 (diff) | |
download | ffmpeg-94aa7e8a764b2136cafe43f296a6e41a6b0a14ed.tar.gz |
lavf/concatdec: add stream_extradata directive
Diffstat (limited to 'libavformat/concatdec.c')
-rw-r--r-- | libavformat/concatdec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 0dd39a149e..ded0ba6031 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -432,6 +432,7 @@ typedef enum ParseDirective { DIR_EXSID, DIR_STMETA, DIR_STCODEC, + DIR_STEDATA, DIR_CHAPTER, } ParseDirective; @@ -448,6 +449,7 @@ static const ParseSyntax syntax[] = { [DIR_EXSID ] = { "exact_stream_id", "i", NEEDS_STREAM }, [DIR_STMETA ] = { "stream_meta", "ks", NEEDS_STREAM }, [DIR_STCODEC ] = { "stream_codec", "k", NEEDS_STREAM }, + [DIR_STEDATA ] = { "stream_extradata", "k", NEEDS_STREAM }, [DIR_CHAPTER ] = { "chapter", "idd", 0 }, }; @@ -612,6 +614,15 @@ static int concat_parse_script(AVFormatContext *avf) break; } + case DIR_STEDATA: { + int size = ff_hex_to_data(NULL, arg_kw[0]); + ret = ff_alloc_extradata(stream->codecpar, size); + if (ret < 0) + FAIL(ret); + ff_hex_to_data(stream->codecpar->extradata, arg_kw[0]); + break; + } + case DIR_CHAPTER: chapter = avpriv_new_chapter(avf, arg_int[0], AV_TIME_BASE_Q, arg_int[1], arg_int[2], NULL); |