Mercurial > libavcodec.hg
comparison xsubdec.c @ 5488:0f736b1402ca libavcodec
get rid of av_rescale_q, it does not work as intended.
author | reimar |
---|---|
date | Sun, 05 Aug 2007 12:11:22 +0000 |
parents | 3039b660bf35 |
children | dc54869af30b |
comparison
equal
deleted
inserted
replaced
5487:3039b660bf35 | 5488:0f736b1402ca |
---|---|
18 for (i = 0; i < sizeof(tc_offsets); i++) { | 18 for (i = 0; i < sizeof(tc_offsets); i++) { |
19 uint8_t c = buf[tc_offsets[i]] - '0'; | 19 uint8_t c = buf[tc_offsets[i]] - '0'; |
20 if (c > 9) return AV_NOPTS_VALUE; | 20 if (c > 9) return AV_NOPTS_VALUE; |
21 ms = (ms + c) * tc_muls[i]; | 21 ms = (ms + c) * tc_muls[i]; |
22 } | 22 } |
23 ms = av_rescale_q(ms, (AVRational){1, 1000}, avctx->time_base); | |
24 return ms; | 23 return ms; |
25 } | 24 } |
26 | 25 |
27 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 26 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
28 uint8_t *buf, int buf_size) { | 27 uint8_t *buf, int buf_size) { |