[FFmpeg-cvslog] r20828 - trunk/libavformat/rmdec.c

Måns Rullgård mans
Mon Dec 14 01:37:02 CET 2009


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.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list