Merge commit '249796e2560c2cce1add722c3e873de96b17be74'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Apr 2015 23:37:34 +0000 (01:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Apr 2015 23:41:00 +0000 (01:41 +0200)
* commit '249796e2560c2cce1add722c3e873de96b17be74':
  svq3: initialize some required H264Context fields.

See: e6c710600e1d474b53e52398969140f79052bfde
See: aa000ddab2352b82b9ef7ec0974080065b7cc409
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/svq3.c

@@@ -886,21 -878,27 +886,25 @@@ static av_cold int svq3_decode_init(AVC
      s->last_pic = av_mallocz(sizeof(*s->last_pic));
      s->next_pic = av_mallocz(sizeof(*s->next_pic));
      if (!s->next_pic || !s->last_pic || !s->cur_pic) {
 -        av_freep(&s->cur_pic);
 -        av_freep(&s->last_pic);
 -        av_freep(&s->next_pic);
 -        return AVERROR(ENOMEM);
 +        ret = AVERROR(ENOMEM);
 +        goto fail;
      }
  
 -    if (ff_h264_decode_init(avctx) < 0)
 -        return -1;
 +    if ((ret = ff_h264_decode_init(avctx)) < 0)
 +        goto fail;
  
      ff_h264dsp_init(&h->h264dsp, 8, 1);
 -    ff_h264chroma_init(&h->h264chroma, 8);
 -    ff_h264qpel_init(&h->h264qpel, 8);
 +    av_assert0(h->sps.bit_depth_chroma == 0);
-     ff_h264_pred_init(&h->hpc, h->avctx->codec_id, 8, 1);
+     ff_h264_pred_init(&h->hpc, AV_CODEC_ID_SVQ3, 8, 1);
      ff_videodsp_init(&h->vdsp, 8);
-     h->sps.bit_depth_luma = avctx->bits_per_raw_sample = 8;
      memset(h->pps.scaling_matrix4, 16, 6 * 16 * sizeof(uint8_t));
      memset(h->pps.scaling_matrix8, 16, 2 * 64 * sizeof(uint8_t));
  
++    avctx->bits_per_raw_sample = 8;
+     h->sps.bit_depth_luma = 8;
+     h->chroma_format_idc = 1;
      ff_hpeldsp_init(&s->hdsp, avctx->flags);
      ff_tpeldsp_init(&s->tdsp);