summaryrefslogtreecommitdiff
path: root/libavcodec/encode.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-23 21:16:00 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-27 02:23:43 +0200
commit52dcf0e0f56b4a696ba134221c03facdc166c7fc (patch)
tree7e6bc860d7d6ecdf01b666afa581acd407d68812 /libavcodec/encode.c
parent1e6307f46c486d17f670043672d49335ea1bae97 (diff)
avcodec/encode: Remove redundant check
frame is always set at this point for no-delay encoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r--libavcodec/encode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index f7b13c8ba1..f66e2f9ba8 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -194,7 +194,7 @@ int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt,
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO &&
!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY))
avpkt->pts = avpkt->dts = frame->pts;
- if (frame && !(avctx->codec->capabilities & AV_CODEC_CAP_DELAY)) {
+ if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY)) {
if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
if (avpkt->pts == AV_NOPTS_VALUE)
avpkt->pts = frame->pts;