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 <[email protected]> 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 <[email protected]> > --- > 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 > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
