# HG changeset patch # User bcoudurier # Date 1211773627 0 # Node ID e092bf9b744f2c12b2b61d51c6a5b61939106545 # Parent 54e578571711792a09cfcd99473201745f69bbe3 move get_pts function to avoid useless declaration diff -r 54e578571711 -r e092bf9b744f ffmdec.c --- a/ffmdec.c Mon May 26 03:46:06 2008 +0000 +++ b/ffmdec.c Mon May 26 03:47:07 2008 +0000 @@ -23,8 +23,6 @@ #include "ffm.h" #include -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; @@ -109,6 +107,19 @@ 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) { @@ -376,20 +387,6 @@ 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 */