# HG changeset patch # User lorenm # Date 1115103239 0 # Node ID d5de8b677bad35f4ff7c8497d76a13744b6c612b # Parent e2780f828440c79059b1298c1f95dfe3e047cbb5 clear the DPB after seeking. diff -r e2780f828440 -r d5de8b677bad h264.c --- a/h264.c Mon May 02 22:14:42 2005 +0000 +++ b/h264.c Tue May 03 06:53:59 2005 +0000 @@ -3457,6 +3457,16 @@ h->short_ref_count=0; } +/* forget old pics after a seek */ +static void flush_dpb(AVCodecContext *avctx){ + H264Context *h= avctx->priv_data; + int i; + for(i=0; i<16; i++) + h->delayed_pic[i]= NULL; + h->delayed_output_pic= NULL; + idr(h); +} + /** * * @return the removed picture or NULL if an error occures @@ -7208,6 +7218,7 @@ decode_end, decode_frame, /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, + .flush= flush_dpb, }; AVCodecParser h264_parser = {