[FFmpeg-cvslog] r13417 - trunk/libavformat/ffmdec.c
bcoudurier
subversion
Mon May 26 05:50:25 CEST 2008
Author: bcoudurier
Date: Mon May 26 05:50:25 2008
New Revision: 13417
Log:
move ffm_seek1 before get_pts function since func uses it
Modified:
trunk/libavformat/ffmdec.c
Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c (original)
+++ trunk/libavformat/ffmdec.c Mon May 26 05:50:25 2008
@@ -109,6 +109,23 @@ static int ffm_read_data(AVFormatContext
//#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(AVFormatConte
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 */
More information about the ffmpeg-cvslog
mailing list