[libav-devel] [PATCH 1/2] lavc/qsvdec: set complete_frame flags for non-interlaced frames.

Maxym Dmytrychenko maxim.d33 at gmail.com
Mon Mar 19 10:59:24 CET 2018


 MFX_BITSTREAM_COMPLETE_FRAME support can be added as a param
 or can be only such if() conditions sufficient for all cases and streams ?

On Mon, Mar 19, 2018 at 10:33 AM, Zhong Li <zhong.li at intel.com> wrote:

> Set the flag MFX_BITSTREAM_COMPLETE_FRAME when it is a completed frame.
> This can fix vc1 decoding segment fault issues because can't set the start
> code correctly.
> See: ./avconv -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1
> -vf "hwdownload, format=nv12" -f rawvideo /dev/null
>
> Signed-off-by: Zhong Li <zhong.li at intel.com>
> ---
>  libavcodec/qsvdec.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> index c74ec68..dc44865 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -321,6 +321,9 @@ static int qsv_decode(AVCodecContext *avctx,
> QSVContext *q,
>          bs.DataLength = avpkt->size;
>          bs.MaxLength  = bs.DataLength;
>          bs.TimeStamp  = avpkt->pts;
> +        if (avctx->field_order == AV_FIELD_UNKNOWN ||
> +            avctx->field_order == AV_FIELD_PROGRESSIVE)
> +            bs.DataFlag   |= MFX_BITSTREAM_COMPLETE_FRAME;
>      }
>
>      sync = av_mallocz(sizeof(*sync));
> --
> 1.8.3.1
>
> _______________________________________________
> libav-devel mailing list
> libav-devel at libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel


More information about the libav-devel mailing list