Commit 74fd4d3d authored by lorenm's avatar lorenm

clear the DPB after seeking.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4174 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2203f34f
......@@ -3457,6 +3457,16 @@ static void idr(H264Context *h){
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 @@ AVCodec h264_decoder = {
decode_end,
decode_frame,
/*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
.flush= flush_dpb,
};
AVCodecParser h264_parser = {
......
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