Commit fcc01ba3 authored by James Almer's avatar James Almer

avcodec/truehd_core: reset state when flushing

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 38baaa16
...@@ -174,6 +174,12 @@ fail: ...@@ -174,6 +174,12 @@ fail:
return ret; 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[] = { static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_TRUEHD, AV_CODEC_ID_NONE, AV_CODEC_ID_TRUEHD, AV_CODEC_ID_NONE,
}; };
...@@ -182,5 +188,6 @@ const AVBitStreamFilter ff_truehd_core_bsf = { ...@@ -182,5 +188,6 @@ const AVBitStreamFilter ff_truehd_core_bsf = {
.name = "truehd_core", .name = "truehd_core",
.priv_data_size = sizeof(TrueHDCoreContext), .priv_data_size = sizeof(TrueHDCoreContext),
.filter = truehd_core_filter, .filter = truehd_core_filter,
.flush = truehd_core_flush,
.codec_ids = codec_ids, .codec_ids = codec_ids,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment