Hi,

On Mon, May 30, 2011 at 2:07 PM, Diego Biurrun <[email protected]> wrote:
> ---
>  libavcodec/mpegaudiodec.c |    2 -
>  libavcodec/mpegaudioenc.c |    2 +-
>  libavfilter/vsrc_movie.c  |    2 +-
>  libavformat/ape.c         |   54 
> +++++++++++++++++++++++++--------------------
>  libavformat/mxfdec.c      |    8 +++---
>  libavformat/r3d.c         |   13 +++++-----
>  6 files changed, 43 insertions(+), 38 deletions(-)
[..]
> 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.

> diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
[..]
> @@ -152,7 +152,7 @@ static int movie_init(AVFilterContext *ctx)
>     movie->w = movie->codec_ctx->width;
>     movie->h = movie->codec_ctx->height;
>
> -    av_log(ctx, AV_LOG_INFO, "seek_point:%lld format_name:%s file_name:%s 
> stream_index:%d\n",
> +    av_log(ctx, AV_LOG_INFO, "seek_point:%"PRIi64" format_name:%s 
> file_name:%s stream_index:%d\n",
>            movie->seek_point, movie->format_name, movie->file_name,
>            movie->stream_index);

OK.

> 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?

> @@ -140,12 +140,14 @@ static void ape_dumpinfo(AVFormatContext * s, 
> APEContext * ape_ctx)
>
>     av_log(s, AV_LOG_DEBUG, "\nFrames\n\n");
>     for (i = 0; i < ape_ctx->totalframes; i++)
> -        av_log(s, AV_LOG_DEBUG, "%8d   %8lld %8d (%d samples)\n", i, 
> ape_ctx->frames[i].pos, ape_ctx->frames[i].size, ape_ctx->frames[i].nblocks);
> +        av_log(s, AV_LOG_DEBUG, "%8d   %8"PRId64" %8d (%d samples)\n", i,
> +               ape_ctx->frames[i].pos, ape_ctx->frames[i].size,
> +               ape_ctx->frames[i].nblocks);

This chunk is OK.

> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
[..]
> @@ -309,7 +309,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket 
> *pkt)
>         if (klv_read_packet(&klv, s->pb) < 0)
>             return -1;
>         PRINT_KEY(s, "read packet", klv.key);
> -        av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset);
> +        av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, 
> klv.offset);
>         if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
>             int res = mxf_decrypt_triplet(s, pkt, &klv);
>             if (res < 0) {
> @@ -522,8 +522,8 @@ static int mxf_read_index_table_segment(void *arg, 
> AVIOContext *pb, int tag, int
>     case 0x3F06: av_dlog(NULL, "IndexSID %d\n", avio_rb32(pb)); break;
>     case 0x3F07: av_dlog(NULL, "BodySID %d\n", avio_rb32(pb)); break;
>     case 0x3F0B: av_dlog(NULL, "IndexEditRate %d/%d\n", avio_rb32(pb), 
> avio_rb32(pb)); break;
> -    case 0x3F0C: av_dlog(NULL, "IndexStartPosition %lld\n", avio_rb64(pb)); 
> break;
> -    case 0x3F0D: av_dlog(NULL, "IndexDuration %lld\n", avio_rb64(pb)); break;
> +    case 0x3F0C: av_dlog(NULL, "IndexStartPosition %"PRIu64"\n", 
> avio_rb64(pb)); break;
> +    case 0x3F0D: av_dlog(NULL, "IndexDuration %"PRIu64"\n", avio_rb64(pb)); 
> break;
>     }
>     return 0;
>  }
> @@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, 
> AVFormatParameters *ap)
>         if (klv_read_packet(&klv, s->pb) < 0)
>             return -1;
>         PRINT_KEY(s, "read header", klv.key);
> -        av_dlog(s, "size %lld offset %#llx\n", klv.length, klv.offset);
> +        av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, 
> klv.offset);
>         if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
>             IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
>             /* FIXME avoid seek */

OK.

> diff --git a/libavformat/r3d.c b/libavformat/r3d.c
[..]
> @@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
>     if (atom->size < 8)
>         return -1;
>     atom->tag = avio_rl32(s->pb);
> -    av_dlog(s, "atom %d %.4s offset %#llx\n",
> +    av_dlog(s, "atom %u %.4s offset %#"PRIx64"\n",
>             atom->size, (char*)&atom->tag, atom->offset);
>     return atom->size;
>  }
> @@ -131,7 +131,7 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom)
>     if (st->codec->time_base.den)
>         st->duration = (uint64_t)r3d->video_offsets_count*
>             
> st->time_base.den*st->codec->time_base.num/st->codec->time_base.den;
> -    av_dlog(s, "duration %lld\n", st->duration);
> +    av_dlog(s, "duration %"PRId64"\n", st->duration);
>
>     return 0;
>  }
> @@ -176,7 +176,7 @@ static int r3d_read_header(AVFormatContext *s, 
> AVFormatParameters *ap)
>     }
>
>     s->data_offset = avio_tell(s->pb);
> -    av_dlog(s, "data offset %#llx\n", s->data_offset);
> +    av_dlog(s, "data offset %#"PRIx64"\n", s->data_offset);
>     if (!s->pb->seekable)
>         return 0;
>     // find REOB/REOF/REOS to load index
> @@ -255,7 +255,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket 
> *pkt, Atom *atom)
>     if (st->codec->time_base.den)
>         pkt->duration = (uint64_t)st->time_base.den*
>             st->codec->time_base.num/st->codec->time_base.den;
> -    av_dlog(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration);
> +    av_dlog(s, "pkt dts %"PRId64" duration %d\n", pkt->dts, pkt->duration);
>
>     return 0;
>  }
> @@ -299,7 +299,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket 
> *pkt, Atom *atom)
>     pkt->stream_index = 1;
>     pkt->dts = dts;
>     pkt->duration = av_rescale(samples, st->time_base.den, 
> st->codec->sample_rate);
> -    av_dlog(s, "pkt dts %lld duration %d samples %d sample rate %d\n",
> +    av_dlog(s, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",
>             pkt->dts, pkt->duration, samples, st->codec->sample_rate);
>
>     return 0;
> @@ -356,7 +356,8 @@ static int r3d_seek(AVFormatContext *s, int stream_index, 
> int64_t sample_time, i
>
>     frame_num = sample_time*st->codec->time_base.den/
>         ((int64_t)st->codec->time_base.num*st->time_base.den);
> -    av_dlog(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
> +    av_dlog(s, "seek frame num %d timestamp %"PRId64"\n",
> +            frame_num, sample_time);
>
>     if (frame_num < r3d->video_offsets_count) {
>         avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET);

OK.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to