[FFmpeg-cvslog] fftools/ffmpeg_enc: remove unnecessary pointer references from enc_open()

Anton Khirnov git at videolan.org
Thu Sep 26 19:33:11 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Sep 10 11:16:29 2024 +0200| [6525fe4e773b054bc4d48fd06208262a8040e592] | committer: Anton Khirnov

fftools/ffmpeg_enc: remove unnecessary pointer references from enc_open()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6525fe4e773b054bc4d48fd06208262a8040e592
---

 fftools/ffmpeg_enc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 796849fdb9..499d6ea1f3 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -343,7 +343,7 @@ int enc_open(void *opaque, const AVFrame *frame)
         return ret;
     }
 
-    if ((ret = avcodec_open2(ost->enc_ctx, enc, NULL)) < 0) {
+    if ((ret = avcodec_open2(enc_ctx, enc, NULL)) < 0) {
         if (ret != AVERROR_EXPERIMENTAL)
             av_log(e, AV_LOG_ERROR, "Error while opening encoder - maybe "
                    "incorrect parameters such as bit_rate, rate, width or height.\n");
@@ -352,11 +352,11 @@ int enc_open(void *opaque, const AVFrame *frame)
 
     e->opened = 1;
 
-    if (ost->enc_ctx->frame_size)
-        frame_samples = ost->enc_ctx->frame_size;
+    if (enc_ctx->frame_size)
+        frame_samples = enc_ctx->frame_size;
 
-    if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 &&
-        ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
+    if (enc_ctx->bit_rate && enc_ctx->bit_rate < 1000 &&
+        enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
         av_log(e, AV_LOG_WARNING, "The bitrate parameter is set too low."
                                     " It takes bits/s as argument, not kbits/s\n");
 



More information about the ffmpeg-cvslog mailing list