h264: call the hwaccel frame_start() from h264_field_start()

This is a more appropriate place for it.
This commit is contained in:
Anton Khirnov 2016-05-20 12:21:36 +02:00
parent d1d7678040
commit 606fb6c032
2 changed files with 6 additions and 4 deletions

View File

@ -1344,6 +1344,12 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
return ret;
}
if (h->avctx->hwaccel) {
ret = h->avctx->hwaccel->start_frame(h->avctx, NULL, 0);
if (ret < 0)
return ret;
}
return 0;
}

View File

@ -722,10 +722,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
if (h->current_slice == 1) {
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS))
decode_postinit(h, i >= nals_needed);
if (h->avctx->hwaccel &&
(ret = h->avctx->hwaccel->start_frame(h->avctx, NULL, 0)) < 0)
return ret;
}
if (sl->redundant_pic_count == 0 &&