On Tue, 26 Apr 2016 17:21:10 +0300 Ivan Uskov <ivan.us...@nablet.com> wrote:
> From 75d3a992e3c11edd39607cdc0109928db7905638 Mon Sep 17 00:00:00 2001 > From: Ivan Uskov <ivan.us...@nablet.com> > Date: Tue, 26 Apr 2016 10:13:04 -0400 > Subject: [PATCH] Bug fixed: wrong ticks_per_frame. For H.264 stream > ticks_per_frame should be 2 > > --- > libavcodec/qsvdec_h2645.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c > index a396f31..fda827c 100644 > --- a/libavcodec/qsvdec_h2645.c > +++ b/libavcodec/qsvdec_h2645.c > @@ -82,9 +82,11 @@ static av_cold int qsv_decode_init(AVCodecContext *avctx) > } > } > > - if (avctx->codec_id == AV_CODEC_ID_H264) > + if (avctx->codec_id == AV_CODEC_ID_H264) { > s->bsf = av_bitstream_filter_init("h264_mp4toannexb"); > - else > + //regarding ticks_per_frame description, should be 2 for h.264: > + avctx->ticks_per_frame = 2; > + } else I can see that this code is run only for h264, and I can see that you set the field to 2. The added comment adds no new information and is useless. > s->bsf = av_bitstream_filter_init("hevc_mp4toannexb"); > if (!s->bsf) { > ret = AVERROR(ENOMEM); _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel