Browse Source

matroskadec: set a default duration also for packets comming from a simple block

tags/n0.8
Aurelien Jacobs 14 years ago
parent
commit
6f1260f870
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/matroskadec.c

+ 2
- 2
libavformat/matroskadec.c View File

@@ -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…
Cancel
Save