[FFmpeg-cvslog] Rename sync() functions in libavformat.

Carl Eugen Hoyos git at videolan.org
Wed Nov 26 01:11:02 CET 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Nov 25 23:49:58 2014 +0100| [5badcdf20d98b7edede3d7701d31dba58822a99a] | committer: Carl Eugen Hoyos

Rename sync() functions in libavformat.

Fixes compilation on Android where the sync() definition in
unistd.h interferes with the static definitions in libavformat.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5badcdf20d98b7edede3d7701d31dba58822a99a
---

 libavformat/lxfdec.c |    4 ++--
 libavformat/rmdec.c  |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 11d6da5..fb37da7 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -83,7 +83,7 @@ static int check_checksum(const uint8_t *header, int size)
  * @param[out] header where to copy the ident to
  * @return 0 if an ident was found, < 0 on I/O error
  */
-static int sync(AVFormatContext *s, uint8_t *header)
+static int lxf_sync(AVFormatContext *s, uint8_t *header)
 {
     uint8_t buf[LXF_IDENT_LENGTH];
     int ret;
@@ -120,7 +120,7 @@ static int get_packet_header(AVFormatContext *s)
     const uint8_t *p = header + LXF_IDENT_LENGTH;
 
     //find and read the ident
-    if ((ret = sync(s, header)) < 0)
+    if ((ret = lxf_sync(s, header)) < 0)
         return ret;
 
     ret = avio_read(pb, header + LXF_IDENT_LENGTH, 8);
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 96b9e7f..c46b53f 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -610,7 +610,7 @@ static int get_num(AVIOContext *pb, int *len)
 /* multiple of 20 bytes for ra144 (ugly) */
 #define RAW_PACKET_SIZE 1000
 
-static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_index, int64_t *pos){
+static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_index, int64_t *pos){
     RMDemuxContext *rm = s->priv_data;
     AVIOContext *pb = s->pb;
     AVStream *st;
@@ -964,7 +964,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
                 flags = (seq++ == 1) ? 2 : 0;
                 pos = avio_tell(s->pb);
             } else {
-                len=sync(s, &timestamp, &flags, &i, &pos);
+                len = rm_sync(s, &timestamp, &flags, &i, &pos);
                 if (len > 0)
                     st = s->streams[i];
             }
@@ -1035,7 +1035,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
         int seq=1;
         AVStream *st;
 
-        len=sync(s, &dts, &flags, &stream_index2, &pos);
+        len = rm_sync(s, &dts, &flags, &stream_index2, &pos);
         if(len<0)
             return AV_NOPTS_VALUE;
 



More information about the ffmpeg-cvslog mailing list