diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:10:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:10:42 +0300 |
commit | 58d6cbba6da31db8dc8a2b42d528b9a353081904 (patch) | |
tree | 04b57a2f809c6f08d84a082edf061f3ece631860 /source/blender/imbuf/intern/anim_movie.c | |
parent | 94549adec4b6857fb6ec4cf77606da51ff7c26b7 (diff) | |
parent | 295d0c52a26730edc6d4ed1276e4051cce006be5 (diff) |
Merge branch 'master' into temp-ghash-setopstemp-ghash-setops
Diffstat (limited to 'source/blender/imbuf/intern/anim_movie.c')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index ffdecb793aa..e2d56d29726 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -99,13 +99,8 @@ #endif //WITH_FFMPEG #ifdef WITH_REDCODE -#ifdef _WIN32 /* on windows we use the ones in extern instead */ -#include "libredcode/format.h" -#include "libredcode/codec.h" -#else -#include "libredcode/format.h" -#include "libredcode/codec.h" -#endif +# include "libredcode/format.h" +# include "libredcode/codec.h" #endif #include "IMB_colormanagement.h" @@ -271,6 +266,8 @@ struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex, char { struct anim *anim; + BLI_assert(!BLI_path_is_rel(name)); + anim = (struct anim *)MEM_callocN(sizeof(struct anim), "anim struct"); if (anim != NULL) { if (colorspace) { @@ -288,6 +285,11 @@ struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex, char return(anim); } +void IMB_suffix_anim(struct anim *anim, const char *suffix) +{ + BLI_strncpy(anim->suffix, suffix, sizeof(anim->suffix)); +} + #ifdef WITH_AVI static int startavi(struct anim *anim) { @@ -1422,11 +1424,18 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) } bool IMB_anim_get_fps(struct anim *anim, - short *frs_sec, float *frs_sec_base) + short *frs_sec, float *frs_sec_base, bool no_av_base) { if (anim->frs_sec) { *frs_sec = anim->frs_sec; *frs_sec_base = anim->frs_sec_base; +#ifdef WITH_FFMPEG + if (no_av_base) { + *frs_sec_base /= AV_TIME_BASE; + } +#else + UNUSED_VARS(no_av_base); +#endif return true; } return false; |