aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_sched.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-25 02:15:34 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-28 03:06:13 +0100
commit432e287e27efa3e9bb19f85cbd3d617e6f33c220 (patch)
treee8392c433df317ea9f5d7a3882d7d210f5dc568f /fftools/ffmpeg_sched.c
parentb89ee2653919c14193f646ba03b2bf1d13c9aa2d (diff)
downloadffmpeg-432e287e27efa3e9bb19f85cbd3d617e6f33c220.tar.gz
fftools/ffmpeg_sched: Explicitly return 0 on sch_enc_send() success
Do not return the return value of the last enc_send_to_dst() call, as this would treat the last call differently from the earlier calls; furthermore, sch_enc_send() explicitly documents to always return 0 on success. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools/ffmpeg_sched.c')
-rw-r--r--fftools/ffmpeg_sched.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c
index ec88017e21..30b2355eb6 100644
--- a/fftools/ffmpeg_sched.c
+++ b/fftools/ffmpeg_sched.c
@@ -2344,15 +2344,13 @@ int sch_enc_send(Scheduler *sch, unsigned enc_idx, AVPacket *pkt)
ret = enc_send_to_dst(sch, enc->dst[i], finished, to_send);
if (ret < 0) {
av_packet_unref(to_send);
- if (ret == AVERROR_EOF) {
- ret = 0;
+ if (ret == AVERROR_EOF)
continue;
- }
return ret;
}
}
- return ret;
+ return 0;
}
static int enc_done(Scheduler *sch, unsigned enc_idx)