[FFmpeg-cvslog] lavf: replace some more avio_seek(SEEK_CUR) with avio_skip

Anton Khirnov git at videolan.org
Wed Mar 23 03:03:40 CET 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Mar 17 07:35:18 2011 +0100| [e42500cb4f5e51aec072fe1994c367823ca36f47] | committer: Ronald S. Bultje

lavf: replace some more avio_seek(SEEK_CUR) with avio_skip

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

 libavformat/mp3dec.c |    2 +-
 libavformat/wtv.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 4073773..dbecf3d 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -90,7 +90,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
         return -1;
 
     /* Check for Xing / Info tag */
-    avio_seek(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1], SEEK_CUR);
+    avio_skip(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
     v = avio_rb32(s->pb);
     if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o')) {
         v = avio_rb32(s->pb);
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index ab51af4..963a6bc 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -701,10 +701,10 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
             return NULL;
         if (!ff_guidcmp(formattype, format_videoinfo2)) {
             int consumed = parse_videoinfoheader2(s, st);
-            avio_seek(pb, FFMAX(size - consumed, 0), SEEK_CUR);
+            avio_skip(pb, FFMAX(size - consumed, 0));
         } else if (!ff_guidcmp(formattype, format_mpeg2_video)) {
             int consumed = parse_videoinfoheader2(s, st);
-            avio_seek(pb, FFMAX(size - consumed, 0), SEEK_CUR);
+            avio_skip(pb, FFMAX(size - consumed, 0));
         } else {
             if (ff_guidcmp(formattype, format_none))
                 av_log(s, AV_LOG_WARNING, "unknown formattype:"PRI_GUID"\n", ARG_GUID(formattype));




More information about the ffmpeg-cvslog mailing list