comparison h264.c @ 2640:d5de8b677bad libavcodec

clear the DPB after seeking.
author lorenm
date Tue, 03 May 2005 06:53:59 +0000
parents ef44d24680d1
children c337f851d0f9
comparison
equal deleted inserted replaced
2639:e2780f828440 2640:d5de8b677bad
3455 h->short_ref[i]= NULL; 3455 h->short_ref[i]= NULL;
3456 } 3456 }
3457 h->short_ref_count=0; 3457 h->short_ref_count=0;
3458 } 3458 }
3459 3459
3460 /* forget old pics after a seek */
3461 static void flush_dpb(AVCodecContext *avctx){
3462 H264Context *h= avctx->priv_data;
3463 int i;
3464 for(i=0; i<16; i++)
3465 h->delayed_pic[i]= NULL;
3466 h->delayed_output_pic= NULL;
3467 idr(h);
3468 }
3469
3460 /** 3470 /**
3461 * 3471 *
3462 * @return the removed picture or NULL if an error occures 3472 * @return the removed picture or NULL if an error occures
3463 */ 3473 */
3464 static Picture * remove_short(H264Context *h, int frame_num){ 3474 static Picture * remove_short(H264Context *h, int frame_num){
7206 decode_init, 7216 decode_init,
7207 NULL, 7217 NULL,
7208 decode_end, 7218 decode_end,
7209 decode_frame, 7219 decode_frame,
7210 /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, 7220 /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
7221 .flush= flush_dpb,
7211 }; 7222 };
7212 7223
7213 AVCodecParser h264_parser = { 7224 AVCodecParser h264_parser = {
7214 { CODEC_ID_H264 }, 7225 { CODEC_ID_H264 },
7215 sizeof(H264Context), 7226 sizeof(H264Context),