diff options
author | Ivan Uskov <ivan.uskov@nablet.com> | 2016-04-26 10:13:04 -0400 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-27 15:33:53 +0100 |
commit | b577a54a7c83986e59d2227c00a0227911c75452 (patch) | |
tree | 8bc6ec4920f4baca891599717ad733323b8b05a2 /libavcodec/qsvdec_h2645.c | |
parent | a2ba50b03a085993eb5bb9baf947e21d1c0060e1 (diff) |
qsv: Fix wrong ticks_per_frame for H.264
For H.264 stream ticks_per_frame should be 2, as per the docs.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/qsvdec_h2645.c')
-rw-r--r-- | libavcodec/qsvdec_h2645.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c index a396f31e88..fda827cef4 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 s->bsf = av_bitstream_filter_init("hevc_mp4toannexb"); if (!s->bsf) { ret = AVERROR(ENOMEM); |