History

avformat: add av_stream_get_codec_timebase()

This will allow ffmpeg.c to stop using AVStream.codec in some cases

James Almer committed 10 years ago

Commit f0b6f721 parent fd902514 files · +23 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavformat/avformat.h +7 −0
  3. libavformat/utils.c +12 −0
  4. libavformat/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2015-08-28 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182016-09-27 - xxxxxxx - lavf 57.51.100 - avformat.h
19 Add av_stream_get_codec_timebase()
20
182016-09-27 - 23c0779 - lswr 2.2.100 - swresample.h212016-09-27 - 23c0779 - lswr 2.2.100 - swresample.h
19 Add swr_build_matrix().22 Add swr_build_matrix().
20 23
libavformat/avformat.h+7−0
@@ -2921,6 +2921,13 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, · 2920 unmodified lines
2921 AVStream *ost, const AVStream *ist,2921 AVStream *ost, const AVStream *ist,
2922 enum AVTimebaseSource copy_tb);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 */
2929AVRational av_stream_get_codec_timebase(const AVStream *st);
2930
2924/**2931/**
2925 * @}2932 * @}
2926 */2933 */
libavformat/utils.c+12−0
@@ -5383,3 +5383,15 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, · 5382 unmodified lines
5383 5383
5384 return 0;5384 return 0;
5385}5385}
5386
5387AVRational av_stream_get_codec_timebase(const AVStream *st)
5388{
5389 // See avformat_transfer_internal_stream_timing_info() TODO.
5390#if FF_API_LAVF_AVCTX
5391FF_DISABLE_DEPRECATION_WARNINGS
5392 return st->codec->time_base;
5393FF_ENABLE_DEPRECATION_WARNINGS
5394#else
5395 return st->internal->avctx->time_base;
5396#endif
5397}
libavformat/version.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
33// Also please add any ticket numbers that you believe might be affected here33// Also please add any ticket numbers that you believe might be affected here
34#define LIBAVFORMAT_VERSION_MAJOR 5734#define LIBAVFORMAT_VERSION_MAJOR 57
35#define LIBAVFORMAT_VERSION_MINOR 5035#define LIBAVFORMAT_VERSION_MINOR 51
36#define LIBAVFORMAT_VERSION_MICRO 10036#define LIBAVFORMAT_VERSION_MICRO 100
37 37
38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t