This will allow ffmpeg.c to stop using AVStream.codec in some cases
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2015-08-28 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2016-09-27 - xxxxxxx - lavf 57.51.100 - avformat.h | |
| 19 | + Add av_stream_get_codec_timebase() | |
| 20 | + | |
| 18 | 21 | 2016-09-27 - 23c0779 - lswr 2.2.100 - swresample.h |
| 19 | 22 | Add swr_build_matrix(). |
| 20 | 23 | |
| @@ -2921,6 +2921,13 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, · 2920 unmodified lines | ||
| 2921 | 2921 | AVStream *ost, const AVStream *ist, |
| 2922 | 2922 | enum AVTimebaseSource copy_tb); |
| 2923 | 2923 | |
| 2924 | +/** | |
| 2925 | + * Get the internal codec timebase from a stream. | |
| 2926 | + * | |
| 2927 | + * @param st input stream to extract the timebase from | |
| 2928 | + */ | |
| 2929 | +AVRational av_stream_get_codec_timebase(const AVStream *st); | |
| 2930 | + | |
| 2924 | 2931 | /** |
| 2925 | 2932 | * @} |
| 2926 | 2933 | */ |
| @@ -5383,3 +5383,15 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, · 5382 unmodified lines | ||
| 5383 | 5383 | |
| 5384 | 5384 | return 0; |
| 5385 | 5385 | } |
| 5386 | + | |
| 5387 | +AVRational av_stream_get_codec_timebase(const AVStream *st) | |
| 5388 | +{ | |
| 5389 | + // See avformat_transfer_internal_stream_timing_info() TODO. | |
| 5390 | +#if FF_API_LAVF_AVCTX | |
| 5391 | +FF_DISABLE_DEPRECATION_WARNINGS | |
| 5392 | + return st->codec->time_base; | |
| 5393 | +FF_ENABLE_DEPRECATION_WARNINGS | |
| 5394 | +#else | |
| 5395 | + return st->internal->avctx->time_base; | |
| 5396 | +#endif | |
| 5397 | +} | |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) |
| 33 | 33 | // Also please add any ticket numbers that you believe might be affected here |
| 34 | 34 | #define LIBAVFORMAT_VERSION_MAJOR 57 |
| 35 | −#define LIBAVFORMAT_VERSION_MINOR 50 | |
| 35 | +#define LIBAVFORMAT_VERSION_MINOR 51 | |
| 36 | 36 | #define LIBAVFORMAT_VERSION_MICRO 100 |
| 37 | 37 | |
| 38 | 38 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |