1
0
Fork 0

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:
Hendrik Leppkes 2011-08-22 23:05:51 +02:00
parent 84cc0ee78f
commit 5961c58381
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
2 changed files with 2 additions and 1 deletions

View File

@ -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];

View File

@ -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 */