diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
commit | fb09531720a4aa2dfa97e5a9a246a453b6278fd2 (patch) | |
tree | 61525c3a8ddb419d3838a26e488fc3659079bbcd /contrib/ffmpeg/libavformat/dv.c | |
parent | 294d01046724e28b7193bcb65bf2a0391b0135b6 (diff) | |
download | xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.gz xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.bz2 |
Sync with a more recent version of FFmpeg.
Diffstat (limited to 'contrib/ffmpeg/libavformat/dv.c')
-rw-r--r-- | contrib/ffmpeg/libavformat/dv.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/ffmpeg/libavformat/dv.c b/contrib/ffmpeg/libavformat/dv.c index 3ff8a3fe2..10a306260 100644 --- a/contrib/ffmpeg/libavformat/dv.c +++ b/contrib/ffmpeg/libavformat/dv.c @@ -358,8 +358,13 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c, return offset; } -void dv_flush_audio_packets(DVDemuxContext *c) +void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset) { + c->frames= frame_offset; + if (c->ach) + c->abytes= av_rescale(c->frames, + c->ast[0]->codec->bit_rate * (int64_t)c->sys->frame_rate_base, + 8*c->sys->frame_rate); c->audio_pkt[0].size = c->audio_pkt[1].size = 0; } @@ -419,13 +424,8 @@ static int dv_read_seek(AVFormatContext *s, int stream_index, DVDemuxContext *c = r->dv_demux; int64_t offset= dv_frame_offset(s, c, timestamp, flags); - c->frames= offset / c->sys->frame_size; - if (c->ach) - c->abytes= av_rescale(c->frames, - c->ast[0]->codec->bit_rate * (int64_t)c->sys->frame_rate_base, - 8*c->sys->frame_rate); + dv_offset_reset(c, offset / c->sys->frame_size); - dv_flush_audio_packets(c); return url_fseek(&s->pb, offset, SEEK_SET); } |