[FFmpeg-devel] [PATCH 3/6] lavc/libx265: mark disposable frames

Marton Balint cus at passwd.hu
Sat Dec 2 11:40:31 EET 2017



On Thu, 30 Nov 2017, John Stebbins wrote:

> Used by movenc to fill sdtp box
> ---
> libavcodec/libx265.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 4456e300f2..c137fe4ae1 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -329,6 +329,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
> FF_ENABLE_DEPRECATION_WARNINGS
> #endif
> 
> +    if (x265pic_out.sliceType == X265_TYPE_B)
> +        pkt->flags |= AV_PKT_FLAG_DISPOSABLE;

You can only set this for B pictures which are not referenced by other 
frames, no? Otherwise they can't be dropped independently from the others.

Regards,
Marton


More information about the ffmpeg-devel mailing list