diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-08-18 11:13:08 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-08-29 15:42:11 +0200 |
commit | 8d26a21bf63514cc566bf8c9de940a786bb33167 (patch) | |
tree | 83908ac26d0305fc1abe1e9d3e38202e483758af /fftools/ffmpeg.h | |
parent | 47b85c5a7642b6ec942c052bbe7d163b70e017a8 (diff) | |
download | ffmpeg-8d26a21bf63514cc566bf8c9de940a786bb33167.tar.gz |
fftools/ffmpeg: stop accessing av_stream_get_parser() from the main thread
It races with the demuxing thread. Instead, send the information along
with the demuxed packets.
Ideally, the code should stop using the stream-internal parsing
completely, but that requires considerably more effort.
Fixes races, e.g. in:
- fate-h264-brokensps-2580
- fate-h264-extradata-reload
- fate-iv8-demux
- fate-m4v-cfr
- fate-m4v
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r-- | fftools/ffmpeg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 921e579c32..27ef92654c 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -348,6 +348,12 @@ typedef struct InputStream { int64_t pts; ///< current pts of the decoded frame (in AV_TIME_BASE units) int wrap_correction_done; + // the value of AVCodecParserContext.repeat_pict from the AVStream parser + // for the last packet returned from ifile_get_packet() + // -1 if unknown + // FIXME: this is a hack, the avstream parser should not be used + int last_pkt_repeat_pict; + int64_t filter_in_rescale_delta_last; int64_t min_pts; /* pts with the smallest value in a current stream */ |