changeset 11632:9a5c269f31f5 libavcodec

H.264: move avctx->refs init before AVCodecContext.get_format().
author gb
date Thu, 15 Apr 2010 08:27:06 +0000
parents aef934aa4787
children d47bd24cb380
files h264.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Apr 14 20:15:50 2010 +0000
+++ b/h264.c	Thu Apr 15 08:27:06 2010 +0000
@@ -1777,6 +1777,8 @@
     }
     h->sps = *h0->sps_buffers[h->pps.sps_id];
 
+    s->avctx->refs= h->sps.ref_frame_count;
+
     if(h == h0 && h->dequant_coeff_pps != pps_id){
         h->dequant_coeff_pps = pps_id;
         init_dequant_tables(h);
@@ -2172,8 +2174,6 @@
     h->emu_edge_width= (s->flags&CODEC_FLAG_EMU_EDGE) ? 0 : 16;
     h->emu_edge_height= (FRAME_MBAFF || FIELD_PICTURE) ? 0 : h->emu_edge_width;
 
-    s->avctx->refs= h->sps.ref_frame_count;
-
     if(s->avctx->debug&FF_DEBUG_PICT_INFO){
         av_log(h->s.avctx, AV_LOG_DEBUG, "slice:%d %s mb:%d %c%s%s pps:%u frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n",
                h->slice_num,