mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/dpx: extract frame rate
Fixes part of Ticket3511 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
af165acefa
commit
e0e60c9211
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/intfloat_readwrite.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_int2flt(i), 4096);
|
||||
if (q.num > 0 && q.den > 0)
|
||||
avctx->time_base = av_inv_q(q);
|
||||
}
|
||||
}
|
||||
|
||||
switch (descriptor) {
|
||||
case 6: // Y
|
||||
elements = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user