diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2011-03-17 01:37:16 +0300 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2011-03-17 01:37:16 +0300 |
commit | 6f1260f87061bdf7a8ff2472e309d9635e5d770d (patch) | |
tree | 0858cd040c3a381aa44cb295c9a5040bd2f48f68 /libavformat/matroskadec.c | |
parent | 69aab68037089b96519496fd8acd71780f62ab2c (diff) |
matroskadec: set a default duration also for packets comming from a simple block
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b0451020c0..d0fe98df0c 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -486,7 +486,7 @@ static EbmlSyntax matroska_segments[] = { static EbmlSyntax matroska_blockgroup[] = { { MATROSKA_ID_BLOCK, EBML_BIN, 0, offsetof(MatroskaBlock,bin) }, { MATROSKA_ID_SIMPLEBLOCK, EBML_BIN, 0, offsetof(MatroskaBlock,bin) }, - { MATROSKA_ID_BLOCKDURATION, EBML_UINT, 0, offsetof(MatroskaBlock,duration), {.u=AV_NOPTS_VALUE} }, + { MATROSKA_ID_BLOCKDURATION, EBML_UINT, 0, offsetof(MatroskaBlock,duration) }, { MATROSKA_ID_BLOCKREFERENCE, EBML_UINT, 0, offsetof(MatroskaBlock,reference) }, { 1, EBML_UINT, 0, offsetof(MatroskaBlock,non_simple), {.u=1} }, { 0 } @@ -1622,7 +1622,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, st = track->stream; if (st->discard >= AVDISCARD_ALL) return res; - if (duration == AV_NOPTS_VALUE) + if (!duration) duration = track->default_duration / matroska->time_scale; block_time = AV_RB16(data); |