[FFmpeg-devel] [PATCH 1/4] ffmpeg: Flush output BSFs when encode reaches EOF

Michael Niedermayer michael at niedermayer.cc
Mon Jun 19 18:32:54 EEST 2017


On Sun, Jun 18, 2017 at 11:09:23PM +0100, Mark Thompson wrote:
> Before this, output bitstream filters would never see EOF and
> therefore would not be able to flush any delayed packets.
> 
> (cherry picked from commit f64d1100a54d12c78ce436181bb64229c56da6b3)
> ---
>  ffmpeg.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 6170bd453c..f265980fdd 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -814,7 +814,8 @@ static void close_output_stream(OutputStream *ost)
>      }
>  }
>  
> -static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
> +static void output_packet(OutputFile *of, AVPacket *pkt,
> +                          OutputStream *ost, int eof)
>  {
>      int ret = 0;
>  

please document why pkt==NULL is not used for eof detection and what
the functionn does with pkt. The caller must be aware of it, if it is
not just used as unchanged input that is written

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170619/f9c46e9e/attachment.sig>


More information about the ffmpeg-devel mailing list