Hi, 2015-02-23 2:49 GMT+01:00 Himangi Saraogi <[email protected]>: > --- > libavcodec/vaapi_h264.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c > index 651a50b..06173a6 100644 > --- a/libavcodec/vaapi_h264.c > +++ b/libavcodec/vaapi_h264.c > @@ -95,7 +95,7 @@ static int dpb_add(DPB *dpb, H264Picture *pic) > int i; > > if (dpb->size >= dpb->max_size) > - return -1; > + return AVERROR_INVALIDDATA; > > for (i = 0; i < dpb->size; i++) { > VAPictureH264 * const va_pic = &dpb->va_pics[i]; > @@ -136,13 +136,13 @@ static int > fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param, > for (i = 0; i < h->short_ref_count; i++) { > H264Picture * const pic = h->short_ref[i]; > if (pic && pic->reference && dpb_add(&dpb, pic) < 0) > - return -1; > + return AVERROR_INVALIDDATA; > } > > for (i = 0; i < 16; i++) { > H264Picture * const pic = h->long_ref[i]; > if (pic && pic->reference && dpb_add(&dpb, pic) < 0) > - return -1; > + return AVERROR_INVALIDDATA; > } > return 0; > }
Those three would be more: "internal error, please report this bug to XXX" so that we could see how to fix it. Thanks. AVERROR_BUG? > @@ -228,6 +228,7 @@ static int vaapi_h264_start_frame(AVCodecContext > *avctx, > struct vaapi_context * const vactx = avctx->hwaccel_context; > VAPictureParameterBufferH264 *pic_param; > VAIQMatrixBufferH264 *iq_matrix; > + int ret; > > av_dlog(avctx, "vaapi_h264_start_frame()\n"); > > @@ -236,10 +237,10 @@ static int vaapi_h264_start_frame(AVCodecContext > *avctx, > /* Fill in VAPictureParameterBufferH264. */ > pic_param = ff_vaapi_alloc_pic_param(vactx, > sizeof(VAPictureParameterBufferH264)); > if (!pic_param) > - return -1; > + return AVERROR(ENOMEM); > fill_vaapi_pic(&pic_param->CurrPic, h->cur_pic_ptr, > h->picture_structure); > - if (fill_vaapi_ReferenceFrames(pic_param, h) < 0) > - return -1; > + if ((ret = fill_vaapi_ReferenceFrames(pic_param, h)) < 0) > + return ret; > pic_param->picture_width_in_mbs_minus1 = > h->mb_width - 1; > pic_param->picture_height_in_mbs_minus1 = > h->mb_height - 1; > pic_param->bit_depth_luma_minus8 = > h->sps.bit_depth_luma - 8; > @@ -280,7 +281,7 @@ static int vaapi_h264_start_frame(AVCodecContext > *avctx, > /* Fill in VAIQMatrixBufferH264. */ > iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, > sizeof(VAIQMatrixBufferH264)); > if (!iq_matrix) > - return -1; > + return AVERROR(ENOMEM); > memcpy(iq_matrix->ScalingList4x4, h->pps.scaling_matrix4, > sizeof(iq_matrix->ScalingList4x4)); > memcpy(iq_matrix->ScalingList8x8[0], h->pps.scaling_matrix8[0], > sizeof(iq_matrix->ScalingList8x8[0])); > memcpy(iq_matrix->ScalingList8x8[1], h->pps.scaling_matrix8[3], > sizeof(iq_matrix->ScalingList8x8[0])); > @@ -324,7 +325,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx, > /* Fill in VASliceParameterBufferH264. */ > slice_param = (VASliceParameterBufferH264 > *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size); > if (!slice_param) > - return -1; > + return AVERORR(ENOMEM); > slice_param->slice_data_bit_offset = get_bits_count(&h->gb) + > 8; /* bit buffer started beyond nal_unit_type */ > slice_param->first_mb_in_slice = (h->mb_y >> > FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + h->mb_x; > slice_param->slice_type = ff_h264_get_slice_type(h); > -- > 1.9.1 > > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel The rest is OK to me. Regards, -- Gwenole Beauchesne Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France Registration Number (RCS): Nanterre B 302 456 199 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
