Skip to content

Commit

Permalink
move get_pts function to avoid useless declaration
Browse files Browse the repository at this point in the history
Originally committed as revision 13415 to svn://svn.ffmpeg.org/ffmpeg/trunk
  • Loading branch information
bcoudurier committed May 26, 2008
1 parent ce2b665 commit 979b1a0
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions libavformat/ffmdec.c
Expand Up @@ -23,8 +23,6 @@
#include "ffm.h"
#include <unistd.h>

static int64_t get_pts(AVFormatContext *s, offset_t pos);

static int ffm_is_avail_data(AVFormatContext *s, int size)
{
FFMContext *ffm = s->priv_data;
Expand Down Expand Up @@ -109,6 +107,19 @@ static int ffm_read_data(AVFormatContext *s,
return size1 - size;
}

static int64_t get_pts(AVFormatContext *s, offset_t pos)
{
ByteIOContext *pb = s->pb;
int64_t pts;

ffm_seek1(s, pos);
url_fskip(pb, 4);
pts = get_be64(pb);
#ifdef DEBUG_SEEK
printf("pts=%0.6f\n", pts / 1000000.0);
#endif
return pts;
}

static void adjust_write_index(AVFormatContext *s)
{
Expand Down Expand Up @@ -376,20 +387,6 @@ static void ffm_seek1(AVFormatContext *s, offset_t pos1)
url_fseek(pb, pos, SEEK_SET);
}

static int64_t get_pts(AVFormatContext *s, offset_t pos)
{
ByteIOContext *pb = s->pb;
int64_t pts;

ffm_seek1(s, pos);
url_fskip(pb, 4);
pts = get_be64(pb);
#ifdef DEBUG_SEEK
printf("pts=%0.6f\n", pts / 1000000.0);
#endif
return pts;
}

/* 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 */
Expand Down

0 comments on commit 979b1a0

Please sign in to comment.