Browse Source

avcodec/truehd_core: reset state when flushing

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.2
James Almer 6 years ago
parent
commit
fcc01ba36a
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavcodec/truehd_core_bsf.c

+ 7
- 0
libavcodec/truehd_core_bsf.c View File

@@ -174,6 +174,12 @@ fail:
return ret;
}

static void truehd_core_flush(AVBSFContext *ctx)
{
TrueHDCoreContext *s = ctx->priv_data;
memset(&s->hdr, 0, sizeof(s->hdr));
}

static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_TRUEHD, AV_CODEC_ID_NONE,
};
@@ -182,5 +188,6 @@ const AVBitStreamFilter ff_truehd_core_bsf = {
.name = "truehd_core",
.priv_data_size = sizeof(TrueHDCoreContext),
.filter = truehd_core_filter,
.flush = truehd_core_flush,
.codec_ids = codec_ids,
};

Loading…
Cancel
Save