[FFmpeg-cvslog] r20828 - trunk/libavformat/rmdec.c
Reimar Döffinger
Reimar.Doeffinger
Mon Dec 14 07:48:23 CET 2009
On Mon, Dec 14, 2009 at 12:37:02AM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>
> > On Sun, Dec 13, 2009 at 05:20:00PM +0100, michael wrote:
> >> Author: michael
> >> Date: Sun Dec 13 17:20:00 2009
> >> New Revision: 20828
> >>
> >> Log:
> >> Print extradata in case of failure. I had this in my local tree and it
> >> might be usefull for others ...
> >>
> >> Modified:
> >> trunk/libavformat/rmdec.c
> >>
> >> Modified: trunk/libavformat/rmdec.c
> >> ==============================================================================
> >> --- trunk/libavformat/rmdec.c Sun Dec 13 16:55:07 2009 (r20827)
> >> +++ trunk/libavformat/rmdec.c Sun Dec 13 17:20:00 2009 (r20828)
> >> @@ -332,7 +332,9 @@ ff_rm_read_mdpr_codecdata (AVFormatConte
> >> case 2: st->codec->codec_id = CODEC_ID_RV20; break;
> >> case 3: st->codec->codec_id = CODEC_ID_RV30; break;
> >> case 4: st->codec->codec_id = CODEC_ID_RV40; break;
> >> - default: goto fail1;
> >> + default:
> >> + av_log(st->codec, AV_LOG_ERROR, "extra:%02X %02X %02X %02X %02X\n", ((uint8_t*)st->codec->extradata)[0], ((uint8_t*)st->codec->extradata)[1], ((uint8_t*)st->codec->extradata)[2], ((uint8_t*)st->codec->extradata)[3], ((uint8_t*)st->codec->extradata)[4]);
> >> + goto fail1;
> >
> > What's with those casts, extradata is already uint8_t, while on the other hand %02X needs an int, not an uint8_t
>
> uint8_t is implicitly converted to int when passed as argument to a
> variadic function.
I just think/thought gcc was warning about it anyway, which makes it a good reason to make use of that.
More information about the ffmpeg-cvslog
mailing list