summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_enc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-05-31 11:52:45 +0200
committerAnton Khirnov <anton@khirnov.net>2023-06-05 16:16:12 +0200
commitf94957e8f4416e09e9530ef071929edb598a7d78 (patch)
tree37d0e16c9153d42165616b7d8f7442f8015cd031 /fftools/ffmpeg_enc.c
parent96e1325d9152323cb6418df017da7aca99d59f78 (diff)
fftools/ffmpeg_mux: simplify calling of_output_packet()
Use NULL packets to signal EOF instead of a separate variable. This is made possible by the previous commit.
Diffstat (limited to 'fftools/ffmpeg_enc.c')
-rw-r--r--fftools/ffmpeg_enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 1515ca971f..8dd8104cea 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -531,7 +531,7 @@ void enc_subtitle(OutputFile *of, OutputStream *ost, AVSubtitle *sub)
}
pkt->dts = pkt->pts;
- of_output_packet(of, pkt, ost, 0);
+ of_output_packet(of, ost, pkt);
}
}
@@ -718,7 +718,7 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame)
av_assert0(frame); // should never happen during flushing
return 0;
} else if (ret == AVERROR_EOF) {
- of_output_packet(of, pkt, ost, 1);
+ of_output_packet(of, ost, NULL);
return ret;
} else if (ret < 0) {
av_log(ost, AV_LOG_ERROR, "%s encoding failed\n", type_desc);
@@ -752,7 +752,7 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame)
e->packets_encoded++;
- of_output_packet(of, pkt, ost, 0);
+ of_output_packet(of, ost, pkt);
}
av_assert0(0);