Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-25 11:14:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-25 11:14:21 +0400
commit49e0175e4018930c906cca1eda14c10cbf71bd24 (patch)
treece58b34c068d76d61ebbce20b25091e7595fbff7 /intern/ffmpeg/ffmpeg_compat.h
parentac9344de75ea775cc0f50db4a28b79356217dc73 (diff)
Use own version of ff_update_cur_dts for FFmpeg >= 0.11, seems
linking against function which isn't public in API gives error when met some circumstances.
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r--intern/ffmpeg/ffmpeg_compat.h16
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