History

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

Anton Khirnov committed 2 years ago

Commit 6525fe41 parent 78038d51 file · +5 −5Browse files

Unified · Split

fftools/ffmpeg_enc.c+5−5
@@ -343,7 +343,7 @@ int enc_open(void *opaque, const AVFrame *frame) · 342 unmodified lines
343343 return ret;
344344 }
345345
346− if ((ret = avcodec_open2(ost->enc_ctx, enc, NULL)) < 0) {
346+ if ((ret = avcodec_open2(enc_ctx, enc, NULL)) < 0) {
347347 if (ret != AVERROR_EXPERIMENTAL)
348348 av_log(e, AV_LOG_ERROR, "Error while opening encoder - maybe "
349349 "incorrect parameters such as bit_rate, rate, width or height.\n");
@@ -352,11 +352,11 @@ int enc_open(void *opaque, const AVFrame *frame) · 2 unmodified lines
352352
353353 e->opened = 1;
354354
355− if (ost->enc_ctx->frame_size)
356− frame_samples = ost->enc_ctx->frame_size;
355+ if (enc_ctx->frame_size)
356+ frame_samples = enc_ctx->frame_size;
357357
358− if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 &&
359− ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
358+ if (enc_ctx->bit_rate && enc_ctx->bit_rate < 1000 &&
359+ enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */)
360360 av_log(e, AV_LOG_WARNING, "The bitrate parameter is set too low."
361361 " It takes bits/s as argument, not kbits/s\n");
362362

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t