summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_hw.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-25 10:01:19 +0200
committerAnton Khirnov <anton@khirnov.net>2022-08-29 15:42:11 +0200
commitd0f767f81f7b6c4e9a3d29a9fd622ab519461213 (patch)
treed24755835a37fe98c87cf1b9a4cc5ca6c0d86c5c /fftools/ffmpeg_hw.c
parent4a4a206304e1d168e9a839d1a9c426e459343322 (diff)
downloadffmpeg-d0f767f81f7b6c4e9a3d29a9fd622ab519461213.tar.gz
fftools/ffmpeg: drop OutputStream.enc
It is either equal to OutputStream.enc_ctx->codec, or NULL when enc_ctx is NULL. Replace the use of enc with enc_ctx->codec, or the equivalent enc_ctx->codec_* fields where more convenient.
Diffstat (limited to 'fftools/ffmpeg_hw.c')
-rw-r--r--fftools/ffmpeg_hw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c
index 8acfeaf08f..88fa782470 100644
--- a/fftools/ffmpeg_hw.c
+++ b/fftools/ffmpeg_hw.c
@@ -461,7 +461,7 @@ int hw_device_setup_for_encode(OutputStream *ost)
}
for (i = 0;; i++) {
- config = avcodec_get_hw_config(ost->enc, i);
+ config = avcodec_get_hw_config(ost->enc_ctx->codec, i);
if (!config)
break;
@@ -472,7 +472,7 @@ int hw_device_setup_for_encode(OutputStream *ost)
av_log(ost->enc_ctx, AV_LOG_VERBOSE, "Using input "
"frames context (format %s) with %s encoder.\n",
av_get_pix_fmt_name(ost->enc_ctx->pix_fmt),
- ost->enc->name);
+ ost->enc_ctx->codec->name);
ost->enc_ctx->hw_frames_ctx = av_buffer_ref(frames_ref);
if (!ost->enc_ctx->hw_frames_ctx)
return AVERROR(ENOMEM);
@@ -487,7 +487,7 @@ int hw_device_setup_for_encode(OutputStream *ost)
if (dev) {
av_log(ost->enc_ctx, AV_LOG_VERBOSE, "Using device %s "
"(type %s) with %s encoder.\n", dev->name,
- av_hwdevice_get_type_name(dev->type), ost->enc->name);
+ av_hwdevice_get_type_name(dev->type), ost->enc_ctx->codec->name);
ost->enc_ctx->hw_device_ctx = av_buffer_ref(dev->device_ref);
if (!ost->enc_ctx->hw_device_ctx)
return AVERROR(ENOMEM);