diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-05-26 03:50:25 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-05-26 03:50:25 +0000 |
commit | a1e01307ad879a39703977db739e74ee36bcbc31 (patch) | |
tree | 8c86d53d5a64d5882eb567afd9e0bc3b2ffc594d /libavformat | |
parent | 4adcbbbeef95414bd54d0c417a54b232abd0125a (diff) | |
download | ffmpeg-a1e01307ad879a39703977db739e74ee36bcbc31.tar.gz |
move ffm_seek1 before get_pts function since func uses it
Originally committed as revision 13417 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/ffmdec.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index efad019b90..277e883711 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -109,6 +109,23 @@ static int ffm_read_data(AVFormatContext *s, //#define DEBUG_SEEK +/* pos is between 0 and file_size - FFM_PACKET_SIZE. It is translated + by the write position inside this function */ +static void ffm_seek1(AVFormatContext *s, offset_t pos1) +{ + FFMContext *ffm = s->priv_data; + ByteIOContext *pb = s->pb; + offset_t pos; + + pos = pos1 + ffm->write_index; + if (pos >= ffm->file_size) + pos -= (ffm->file_size - FFM_PACKET_SIZE); +#ifdef DEBUG_SEEK + printf("seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos); +#endif + url_fseek(pb, pos, SEEK_SET); +} + static int64_t get_pts(AVFormatContext *s, offset_t pos) { ByteIOContext *pb = s->pb; @@ -370,23 +387,6 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -/* pos is between 0 and file_size - FFM_PACKET_SIZE. It is translated - by the write position inside this function */ -static void ffm_seek1(AVFormatContext *s, offset_t pos1) -{ - FFMContext *ffm = s->priv_data; - ByteIOContext *pb = s->pb; - offset_t pos; - - pos = pos1 + ffm->write_index; - if (pos >= ffm->file_size) - pos -= (ffm->file_size - FFM_PACKET_SIZE); -#ifdef DEBUG_SEEK - printf("seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos); -#endif - url_fseek(pb, pos, SEEK_SET); -} - /* seek to a given time in the file. The file read pointer is positioned at or before pts. XXX: the following code is quite approximative */ |