[FFmpeg-devel] [PATCH] libx265: Pass through user-set frame type

Michael Niedermayer michaelni at gmx.at
Wed Jan 21 17:28:47 CET 2015


On Wed, Jan 21, 2015 at 03:18:48PM +0000, Derek Buitenhuis wrote:
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  libavcodec/libx265.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> index 923c750..5e4931a 100644
> --- a/libavcodec/libx265.c
> +++ b/libavcodec/libx265.c
> @@ -226,6 +226,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
>          x265pic.bitDepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
>      }
>  
> +    x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I :
> +                        pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P :
> +                        pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B :
> +                        X265_TYPE_AUTO;
> +

this is missing pic==NULL checks or should be under the if() above
or something like that

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

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- 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/20150121/2a8b75dd/attachment.asc>


More information about the ffmpeg-devel mailing list