summaryrefslogtreecommitdiff
path: root/libavformat/nsvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-17 14:13:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-17 14:13:44 +0000
commit2615800a275acb20062e92669248d3b5106f8761 (patch)
tree88038af0c604659d60255d74e12e84e9166ac276 /libavformat/nsvdec.c
parent2ece2e97738880f8582a01f9efb9cf30ee4747d3 (diff)
Try to fix FATE after my time_base simplification change.
Originally committed as revision 14262 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nsvdec.c')
-rw-r--r--libavformat/nsvdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index f4514cc333..9fdb1a8796 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -180,6 +180,7 @@ typedef struct {
uint32_t vtag, atag;
uint16_t vwidth, vheight;
int16_t avsync;
+ AVRational framerate;
//DVDemuxContext* dv_demux;
} NSVContext;
@@ -428,6 +429,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
framerate= (AVRational){i, 1};
nsv->avsync = get_le16(pb);
+ nsv->framerate = framerate;
#ifdef DEBUG
print_tag("NSV NSVs vtag", vtag, 0);
print_tag("NSV NSVs atag", atag, 0);
@@ -647,8 +649,8 @@ null_chunk_retry:
if( nsv->state == NSV_HAS_READ_NSVS && st[NSV_ST_VIDEO] ) {
/* on a nsvs frame we have new information on a/v sync */
pkt->dts = (((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset-1);
- pkt->dts *= (int64_t)1000 * st[NSV_ST_VIDEO]->time_base.num;
- pkt->dts += (int64_t)nsv->avsync * st[NSV_ST_VIDEO]->time_base.den;
+ pkt->dts *= (int64_t)1000 * nsv->framerate.den;
+ pkt->dts += (int64_t)nsv->avsync * nsv->framerate.num;
PRINT(("NSV AUDIO: sync:%d, dts:%"PRId64, nsv->avsync, pkt->dts));
}
nst->frame_offset++;