[FFmpeg-cvslog] Revert "lavf: deprecate get_strz() in favor of avio_get_str"

Michael Niedermayer git
Sun Mar 6 05:04:49 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar  6 02:10:26 2011 +0100| [4118d66cb39f96a227c2f90d325a73045afe091e] | committer: Michael Niedermayer

Revert "lavf: deprecate get_strz() in favor of avio_get_str"
This API is simply ridiculous.
We of course keep API/ABI compatibility only useage of the worse API
is reverted.

This reverts commit 773947ba76c575abc01ba128206c87440dad40ec.

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

 libavformat/cafdec.c |    4 ++--
 libavformat/ffmdec.c |    3 +--
 libavformat/mov.c    |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index bc0a7760..96403d3 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -185,8 +185,8 @@ static void read_info_chunk(AVFormatContext *s, int64_t size)
     for (i = 0; i < nb_entries; i++) {
         char key[32];
         char value[1024];
-        avio_get_str(pb, INT_MAX, key,   sizeof(key));
-        avio_get_str(pb, INT_MAX, value, sizeof(value));
+        get_strz(pb, key, sizeof(key));
+        get_strz(pb, value, sizeof(value));
         av_metadata_set2(&s->metadata, key, value, 0);
     }
 }
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 2977527..b956c75 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -325,8 +325,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
             codec->qcompress = avio_rb16(pb) / 10000.0;
             codec->qblur = avio_rb16(pb) / 10000.0;
             codec->bit_rate_tolerance = avio_rb32(pb);
-            avio_get_str(pb, INT_MAX, rc_eq_buf, sizeof(rc_eq_buf));
-            codec->rc_eq = av_strdup(rc_eq_buf);
+            codec->rc_eq = av_strdup(get_strz(pb, rc_eq_buf, sizeof(rc_eq_buf)));
             codec->rc_max_rate = avio_rb32(pb);
             codec->rc_min_rate = avio_rb32(pb);
             codec->rc_buffer_size = avio_rb32(pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index e9435a9..be799a4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2331,7 +2331,7 @@ static void mov_read_chapters(AVFormatContext *s)
             avio_get_str16le(sc->pb, len, title, title_len);
         else {
             AV_WB16(title, ch);
-            avio_get_str(sc->pb, len - 2, title + 2, title_len - 2);
+            get_strz(sc->pb, title + 2, len - 1);
         }
 
         ff_new_chapter(s, i, st->time_base, sample->timestamp, end, title);




More information about the ffmpeg-cvslog mailing list