On Tue, May 31, 2011 at 06:11:26AM -0700, Ronald S. Bultje wrote:
>
> On Mon, May 30, 2011 at 2:07 PM, Diego Biurrun <[email protected]> wrote:
> > diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
> [..]
> > @@ -544,7 +544,7 @@ static void compute_bit_allocation(MpegAudioContext *s,
> > }
> > }
> > }
> > - av_dlog(NULL, "current=%d max=%d max_sb=%d alloc=%d\n",
> > + av_dlog(NULL, "current=%d max=%d max_sb=%d alloc=%s\n",
> > current_frame_size, max_frame_size, max_sb,
> > bit_alloc[max_sb]);
>
> Nope. This is not a string. It's a double-array of chars, but not a
> string. Note how the code tries to find max_sb and max_ch, and the
> array has a sb and chan size specifiers, so likely the debug statement
> is old and needs a max_ch=%d argument added, and then the last
> argument needs to be both max_sb and max_cha.
You mean something like this:
av_dlog(NULL, "current=%d max=%d max_sb=%d max_ch=%d alloc=%d\n",
current_frame_size, max_frame_size, max_sb, max_ch,
bit_alloc[max_ch][max_sb]);
? - in any case that variant introduces a new warning:
libavcodec/mpegaudioenc.c:547:9: warning: array subscript is below array
bounds [-Warray-bounds]
> > diff --git a/libavformat/ape.c b/libavformat/ape.c
> [..]
> > @@ -101,14 +101,14 @@ static void ape_dumpinfo(AVFormatContext * s,
> > APEContext * ape_ctx)
> >
> > av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n");
> > av_log(s, AV_LOG_DEBUG, "magic = \"%c%c%c%c\"\n",
> > ape_ctx->magic[0], ape_ctx->magic[1], ape_ctx->magic[2], ape_ctx->magic[3]);
> > - av_log(s, AV_LOG_DEBUG, "fileversion = %d\n",
> > ape_ctx->fileversion);
> > - av_log(s, AV_LOG_DEBUG, "descriptorlength = %d\n",
> > ape_ctx->descriptorlength);
> > - av_log(s, AV_LOG_DEBUG, "headerlength = %d\n",
> > ape_ctx->headerlength);
> > - av_log(s, AV_LOG_DEBUG, "seektablelength = %d\n",
> > ape_ctx->seektablelength);
> > - av_log(s, AV_LOG_DEBUG, "wavheaderlength = %d\n",
> > ape_ctx->wavheaderlength);
> > - av_log(s, AV_LOG_DEBUG, "audiodatalength = %d\n",
> > ape_ctx->audiodatalength);
> > - av_log(s, AV_LOG_DEBUG, "audiodatalength_high = %d\n",
> > ape_ctx->audiodatalength_high);
> > - av_log(s, AV_LOG_DEBUG, "wavtaillength = %d\n",
> > ape_ctx->wavtaillength);
> > + av_log(s, AV_LOG_DEBUG, "fileversion = %"PRId16"\n",
> > ape_ctx->fileversion);
> > + av_log(s, AV_LOG_DEBUG, "descriptorlength = %"PRIu32"\n",
> > ape_ctx->descriptorlength);
> > + av_log(s, AV_LOG_DEBUG, "headerlength = %"PRIu32"\n",
> > ape_ctx->headerlength);
> > + av_log(s, AV_LOG_DEBUG, "seektablelength = %"PRIu32"\n",
> > ape_ctx->seektablelength);
> > + av_log(s, AV_LOG_DEBUG, "wavheaderlength = %"PRIu32"\n",
> > ape_ctx->wavheaderlength);
> > + av_log(s, AV_LOG_DEBUG, "audiodatalength = %"PRIu32"\n",
> > ape_ctx->audiodatalength);
> > + av_log(s, AV_LOG_DEBUG, "audiodatalength_high = %"PRIu32"\n",
> > ape_ctx->audiodatalength_high);
> > + av_log(s, AV_LOG_DEBUG, "wavtaillength = %"PRIu32"\n",
> > ape_ctx->wavtaillength);
>
> ??? I assume the code uses uint32_t for these types?
uint32_t and int16_t, yes.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel