diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 13:38:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 15:49:31 +0200 |
commit | 17085a0251a1493f6447aa3d2ee06fda2c9402f0 (patch) | |
tree | d627e3d5bdcf01ed711249c30247c74dd7087367 /libavcodec/utils.c | |
parent | 51c810e62b63a1451b337b1cba0141b386066668 (diff) | |
parent | 7ea1b3472a61de4aa4d41b571e99418e4997ad41 (diff) | |
download | ffmpeg-17085a0251a1493f6447aa3d2ee06fda2c9402f0.tar.gz |
Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'
* commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41':
lavc: deprecate the use of AVCodecContext.time_base for decoding
Conflicts:
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/mpegvideo_parser.c
libavcodec/utils.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 1b5e3e01d6..12d0196947 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1674,6 +1674,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code } } } + +#if FF_API_AVCTX_TIMEBASE + if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + avctx->time_base = av_inv_q(avctx->framerate); +#endif } end: ff_unlock_avcodec(); @@ -2384,6 +2389,11 @@ fail: * make sure it's set correctly */ av_assert0(!picture->extended_data || picture->extended_data == picture->data); +#if FF_API_AVCTX_TIMEBASE + if (avctx->framerate.num > 0 && avctx->framerate.den > 0) + avctx->time_base = av_inv_q(avctx->framerate); +#endif + return ret; } |