From 1f9139b07b8a896b62c1f28f3d04acac33978c0d Mon Sep 17 00:00:00 2001 From: Rodger Combs Date: Wed, 7 Oct 2015 21:32:14 -0500 Subject: lavf: add automatic bitstream filtering; bump version This solves the problem discussed in https://ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179238.html by allowing AVCodec::write_header to be delayed until after packets have been run through required bitstream filters in order to generate global extradata. It also provides a mechanism by which a muxer can add a bitstream filter to a stream automatically, rather than prompting the user to do so. --- libavformat/internal.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libavformat/internal.h') diff --git a/libavformat/internal.h b/libavformat/internal.h index 4297cb85d7..0e59da0c2d 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -117,6 +117,11 @@ struct AVFormatInternal { int inject_global_side_data; int avoid_negative_ts_use_pts; + + /** + * Whether or not a header has already been written + */ + int header_written; }; struct AVStreamInternal { @@ -125,6 +130,18 @@ struct AVStreamInternal { * from dts. */ int reorder; + + /** + * bitstream filter to run on stream + * - encoding: Set by muxer using ff_stream_add_bitstream_filter + * - decoding: unused + */ + AVBitStreamFilterContext *bsfc; + + /** + * Whether or not check_bitstream should still be run on each packet + */ + int bitstream_checked; }; #ifdef __GNUC__ -- cgit v1.2.3