[FFmpeg-devel] [PATCH 2/4] lavfi/buffersrc: add add av_buffersrc_close().

Michael Niedermayer michaelni at gmx.at
Mon Jul 28 22:25:12 CEST 2014


On Thu, Jul 24, 2014 at 03:39:43PM +0200, Nicolas George wrote:
> Also deprecate adding a NULL frame to mark EOF.
> 
> TODO APIchanges entry, version bump.
> 
[...]
> diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h
> index ea34c04..28ca545 100644
> --- a/libavfilter/buffersrc.h
> +++ b/libavfilter/buffersrc.h
> @@ -145,6 +145,8 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame);
>   *
>   * @param buffer_src  pointer to a buffer source context
>   * @param frame       a frame, or NULL to mark EOF
> + *                    (Using NULL to mark EOF is deprecated, use
> + *                    av_buffersrc_close() instead.)
>   * @param flags       a combination of AV_BUFFERSRC_FLAG_*
>   * @return            >= 0 in case of success, a negative AVERROR code
>   *                    in case of failure
> @@ -154,6 +156,19 @@ int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,
>  
>  
>  /**
> + * Close a buffer source.
> + *
> + * This cause EOF to be propagated along the filter graph.
> + *
> + * @param buffer_src  pointer to a buffer source context
> + * @param pts         the timestamp of the end of stream
> + * @param flags       a combination of AV_BUFFERSRC_FLAG_*
> + * @return            >= 0 in case of success, a negative AVERROR code
> + *                    in case of failure
> + */
> +int av_buffersrc_close(AVFilterContext *buffer_src, int64_t pts, int flags);

API LGTM

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

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140728/d2a37927/attachment.asc>


More information about the ffmpeg-devel mailing list