[FFmpeg-cvslog] h264: call the hwaccel frame_start() from h264_field_start()
Anton Khirnov
git at videolan.org
Thu Aug 4 03:51:37 EEST 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri May 20 12:21:36 2016 +0200| [606fb6c032fa44d9fa1efd4971308c228f2ebfff] | committer: Anton Khirnov
h264: call the hwaccel frame_start() from h264_field_start()
This is a more appropriate place for it.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=606fb6c032fa44d9fa1efd4971308c228f2ebfff
---
libavcodec/h264_slice.c | 6 ++++++
libavcodec/h264dec.c | 4 ----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 244640f..53f745e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -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;
}
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index c99f6e6..b98d141 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -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 &&
More information about the ffmpeg-cvslog
mailing list