[FFmpeg-devel] [PATCH] avio: add avio_get_str as a replacement for get_strz

Michael Niedermayer michaelni
Thu Mar 3 12:28:58 CET 2011


On Tue, Mar 01, 2011 at 06:33:56PM +0100, Anton Khirnov wrote:
[...]
> diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
> index d98c4bf..55465ab 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];
> -        get_strz(pb, key, sizeof(key));
> -        get_strz(pb, value, sizeof(value));
> +        size -= avio_get_str(pb, size, key,   sizeof(key));
> +        size -= avio_get_str(pb, size, value, sizeof(value));
>          av_metadata_set2(&s->metadata, key, value, 0);
>      }
>  }

This is not just a replacement but changes what the code does
if that is better or worse i dont know but it doesnt belong in a function/API
cleanup patch



[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110303/9768d9a4/attachment.pgp>



More information about the ffmpeg-devel mailing list