Add "safe" full parsing mode.
In this mode, the parser does completely process the frame, but timestamps are not mangled in compute_pkt_fields.
This commit is contained in:
parent
84cc0ee78f
commit
5961c58381
|
@ -2730,6 +2730,7 @@ typedef struct AVCodecParserContext {
|
|||
/// Set if the parser has a valid file offset
|
||||
#define PARSER_FLAG_FETCHED_OFFSET 0x0004
|
||||
#define PARSER_FLAG_USE_CODEC_TS 0x1000
|
||||
#define PARSER_FLAG_NO_TIMESTAMP_MANGLING 0x2000
|
||||
|
||||
int64_t offset; ///< byte offset from starting packet start
|
||||
int64_t cur_frame_end[AV_PARSER_PTS_NB];
|
||||
|
|
|
@ -1088,7 +1088,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
|||
|
||||
/* Interpolate PTS and DTS if they are not present. We skip H264
|
||||
* currently because delay and has_b_frames are not reliably set. */
|
||||
if ((delay == 0 || (delay == 1 && pc)) &&
|
||||
if ((delay == 0 || (delay == 1 && pc && !(pc->flags & PARSER_FLAG_NO_TIMESTAMP_MANGLING))) &&
|
||||
onein_oneout) {
|
||||
if (presentation_delayed) {
|
||||
/* DTS = decompression timestamp */
|
||||
|
|
Loading…
Reference in New Issue