diff options
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; |