matroskadec: set a default duration also for packets comming from a simple block
This commit is contained in:
parent
69aab68037
commit
6f1260f870
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user