[FFmpeg-devel] fftools/ffmpeg: Simplify flushing bsf

Submitted by Andreas Rheinhardt on Nov. 15, 2019, 3:56 p.m.

Details

Message ID 20191115155638.21395-1-andreas.rheinhardt@gmail.com
State New
Headers show

Commit Message

Andreas Rheinhardt Nov. 15, 2019, 3:56 p.m.
Since flushing can now also be signalled by sending an empty packet
(a packet without (side-)data), it is unnecessary to explicitly send
NULL as packet to flush the bitstream filters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 fftools/ffmpeg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 27f68933f8..ccadabe83f 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -853,7 +853,7 @@  static void output_packet(OutputFile *of, AVPacket *pkt,
     if (ost->nb_bitstream_filters) {
         int idx;
 
-        ret = av_bsf_send_packet(ost->bsf_ctx[0], eof ? NULL : pkt);
+        ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt);
         if (ret < 0)
             goto finish;
 
@@ -873,7 +873,7 @@  static void output_packet(OutputFile *of, AVPacket *pkt,
 
             /* send it to the next filter down the chain or to the muxer */
             if (idx < ost->nb_bitstream_filters) {
-                ret = av_bsf_send_packet(ost->bsf_ctx[idx], eof ? NULL : pkt);
+                ret = av_bsf_send_packet(ost->bsf_ctx[idx], pkt);
                 if (ret < 0)
                     goto finish;
                 idx++;