Commit 390f1564 authored by James Almer's avatar James Almer

avcodec/h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent b33f5299
......@@ -280,6 +280,15 @@ fail:
return ret;
}
static void h264_mp4toannexb_flush(AVBSFContext *ctx)
{
H264BSFContext *s = ctx->priv_data;
s->idr_sps_seen = 0;
s->idr_pps_seen = 0;
s->new_idr = s->extradata_parsed;
}
static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_H264, AV_CODEC_ID_NONE,
};
......@@ -289,5 +298,6 @@ const AVBitStreamFilter ff_h264_mp4toannexb_bsf = {
.priv_data_size = sizeof(H264BSFContext),
.init = h264_mp4toannexb_init,
.filter = h264_mp4toannexb_filter,
.flush = h264_mp4toannexb_flush,
.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