diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 16 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 2 | ||||
-rw-r--r-- | intern/itasc/kdl/frames_io.cpp | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index fae8590568d..d8172902a4c 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -71,6 +71,7 @@ #define avio_open url_fopen #define avio_tell url_ftell #define avio_close url_fclose +#define avio_size url_fsize #endif /* there are some version inbetween, which have avio_... functions but no @@ -130,4 +131,19 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, } #endif +static inline +int64_t av_get_pts_from_frame(AVFormatContext *avctx, AVFrame * picture) +{ + int64_t pts = picture->pkt_pts; + + if (pts == AV_NOPTS_VALUE) { + pts = picture->pkt_dts; + } + if (pts == AV_NOPTS_VALUE) { + pts = 0; + } + + return pts; +} + #endif diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 55340d6011d..2421c25398a 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -429,7 +429,7 @@ static int compare_len(const void *p1, const void *p2) return -1; } -void MEM_printmemlist_stats() +void MEM_printmemlist_stats(void) { MemHead *membl; MemPrintBlock *pb, *printblock; diff --git a/intern/itasc/kdl/frames_io.cpp b/intern/itasc/kdl/frames_io.cpp index d84e95c766b..3db0790cabf 100644 --- a/intern/itasc/kdl/frames_io.cpp +++ b/intern/itasc/kdl/frames_io.cpp @@ -133,7 +133,7 @@ std::istream& operator >> (std::istream& is,Vector& v) { IOTrace("Stream input Vector (vector or ZERO)"); char storage[10]; EatWord(is,"[]",storage,10); - if (strlen(storage)==0) { + if (storage[0]=='\0') { Eat(is,'['); is >> v(0); Eat(is,','); @@ -194,7 +194,7 @@ std::istream& operator >> (std::istream& is,Rotation& r) { IOTrace("Stream input Rotation (Matrix or EULERZYX, EULERZYZ,RPY, ROT, IDENTITY)"); char storage[10]; EatWord(is,"[]",storage,10); - if (strlen(storage)==0) { + if (storage[0]=='\0') { Eat(is,'['); for (int i=0;i<3;i++) { is >> r(i,0); @@ -255,7 +255,7 @@ std::istream& operator >> (std::istream& is,Frame& T) { IOTrace("Stream input Frame (Rotation,Vector) or DH[...]"); char storage[10]; EatWord(is,"[",storage,10); - if (strlen(storage)==0) { + if (storage[0]=='\0') { Eat(is,'['); is >> T.M; is >> T.p; |