Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-25 00:42:19 +0300
committerJames Almer <jamrial@gmail.com>2017-04-07 23:16:17 +0300
commitb8f26779d615dfb466e90627323b1a4e40639f76 (patch)
treeccffb764e336d7fb4886f1491c18eb4d1e0b5b7b /libavformat/internal.h
parent9f102653fd723005f26c6e8c7525fec585631a72 (diff)
lavf: use the new bitstream filter for extracting extradata
This merges commits 8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4 and 096a8effa3f8f3455292c958c3ed07e798def7bd by Anton Khirnov, with the following change: - extract_extradata_check() is added to know if the codec is supported by the bsf before trying to initialize it. This behaviour is similar to the old AVCodecParser.split checks. The FATE reference changes are due to the filtered out NAL units that the old AVCodecParser.split implementation left alone. Decoding is unchanged as the functions that parse extradata simply ignored said unnecessary NAL units. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 63a1724cfa..c856945ce9 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -178,6 +178,15 @@ struct AVStreamInternal {
enum AVCodecID orig_codec_id;
+ /* the context for extracting extradata in find_stream_info()
+ * inited=1/bsf=NULL signals that extracting is not possible (codec not
+ * supported) */
+ struct {
+ AVBSFContext *bsf;
+ AVPacket *pkt;
+ int inited;
+ } extract_extradata;
+
/**
* Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
*/