[FFmpeg-devel] [PATCH] avcodec/libx265: export choosen picture types

Derek Buitenhuis derek.buitenhuis at gmail.com
Tue Mar 31 20:08:00 CEST 2015


On 3/30/2015 11:45 PM, Michael Niedermayer wrote:
>      pkt->pts = x265pic_out.pts;
>      pkt->dts = x265pic_out.dts;
> +    switch (x265pic_out.sliceType) {
> +    case X265_TYPE_IDR:
> +    case X265_TYPE_I: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; break;
> +    case X265_TYPE_P: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P; break;
> +    case X265_TYPE_B: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B; break;
> +    }

LGTM if you format it like this (for consistency in the file):

    pkt->pts = x265pic_out.pts;
    pkt->dts = x265pic_out.dts;

    switch (x265pic_out.sliceType) {
    case X265_TYPE_I:
        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
        break;
    case X265_TYPE_P:
        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
        break;
    case X265_TYPE_B:
        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B;
        break;
    }

Also I assume it is set to AV_PICTURE_TYPE_NONE by default?

- Derek


More information about the ffmpeg-devel mailing list