diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-03 04:02:45 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-03 04:02:45 +0400 |
commit | 98a7ca61fa905792bd3fdfa6c29f44691c9582ac (patch) | |
tree | 47455f2482f6eca0352c10c57482641eec6afb57 /intern/ffmpeg/ffmpeg_compat.h | |
parent | 4e39a854b4589cddff484649d95cce4c71d4e9f4 (diff) | |
parent | 2ed69a95f499081aacc15c0295f3461c38430554 (diff) |
Merged changes in the trunk up to revision 48505.
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index 703c528bdea..2fd61570011 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -80,12 +80,24 @@ #endif #if ((LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR > 32)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR == 24) && (LIBAVFORMAT_VERSION_MICRO >= 100))) -void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); +static inline +void my_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) +{ + int i; + + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + + st->cur_dts = av_rescale(timestamp, + st->time_base.den * (int64_t)ref_st->time_base.num, + st->time_base.num * (int64_t)ref_st->time_base.den); + } +} static inline void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) { - ff_update_cur_dts(s, ref_st, timestamp); + my_update_cur_dts(s, ref_st, timestamp); } #endif |