summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavcodec/dpx.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/dpx.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dpx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/dpx.c b/chromium/third_party/ffmpeg/libavcodec/dpx.c
index 5c3c3e81cb3..a21362eb113 100644
--- a/chromium/third_party/ffmpeg/libavcodec/dpx.c
+++ b/chromium/third_party/ffmpeg/libavcodec/dpx.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat.h"
#include "libavutil/imgutils.h"
#include "bytestream.h"
#include "avcodec.h"
@@ -146,6 +147,16 @@ static int decode_frame(AVCodecContext *avctx,
else
avctx->sample_aspect_ratio = (AVRational){ 0, 1 };
+ if (offset >= 1724 + 4) {
+ buf = avpkt->data + 1724;
+ i = read32(&buf, endian);
+ if(i) {
+ AVRational q = av_d2q(av_int2float(i), 4096);
+ if (q.num > 0 && q.den > 0)
+ avctx->time_base = av_inv_q(q);
+ }
+ }
+
switch (descriptor) {
case 6: // Y
elements = 1;