[FFmpeg-devel] [PATCH] Funcom ISS playback
Michael Niedermayer
michaelni
Sat Jan 17 20:36:37 CET 2009
On Sat, Jan 17, 2009 at 08:10:40PM +0100, Stefan Gehrer wrote:
> Michael Niedermayer wrote:
>> On Sat, Jan 17, 2009 at 06:06:10PM +0100, Stefan Gehrer wrote:
>>> Diego Biurrun wrote:
>>>> On Sat, Jan 17, 2009 at 02:19:05PM +0100, Stefan Gehrer wrote:
>>>>> [...]
>>>> Documentation and changelog updats are missing.
>>> Done.
>>>
>>>>> --- libavformat/iss.c (revision 0)
>>>>> +++ libavformat/iss.c (revision 0)
>>>>> @@ -0,0 +1,129 @@
>>>>> +
>>>>> +static av_cold int iss_read_header(AVFormatContext *s,
>>>>> + AVFormatParameters *ap)
>>>> weird indentation
>>>>> +static int iss_read_packet(AVFormatContext *s,
>>>>> + AVPacket *pkt)
>>>> nit: unnecessary linebreak ;)
>>> actually both line breaks were unnecessary to keep
>>> within 80 columns, how does this patch look like?
>>>
>>> Stefan
>> [...]
>>> +static void get_token(ByteIOContext *s, char *buf, int maxlen)
>>> +{
>>> + int i = 0;
>>> + char c;
>>> +
>>> + while ((c = get_byte(s)) != ' ') {
>>> + buf[i++] = c;
>>> + if (i == maxlen-1)
>>> + break;
>>> + }
>>> + buf[i] = 0; /* Ensure null terminated, but may be truncated */
>>> +}
>> this will fail to skip too log fields
>
> It took me a while to understand where the problem is, but I think
> I got it corrected now.
>
>> [...]
>>> + c->status[0].predictor = (int16_t)AV_RL16(src + 0);
>>> + c->status[0].step_index = src[2];
>>> + src += 4;
>>> + if(st) {
>>> + c->status[1].predictor = (int16_t)AV_RL16(src + 0);
>>> + c->status[1].step_index = src[2]; + src
>>> += 4;
>>> + }
>>> + + while (src < buf + buf_size) {
>>> +
>>> + if (st) {
>>> + *samples++ = adpcm_ima_expand_nibble(&c->status[0],
>>> + src[0] >> 4 , 3);
>>> + *samples++ = adpcm_ima_expand_nibble(&c->status[1],
>>> + src[0] & 0x0F, 3);
>>> + } else {
>>> + *samples++ = adpcm_ima_expand_nibble(&c->status[0],
>>> + src[0] & 0x0F , 3);
>>> + *samples++ = adpcm_ima_expand_nibble(&c->status[0],
>>> + src[0] >> 4, 3);
>> the ", 3" is strangely placed vertically
>
> fixed, next try attached.
looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090117/12d91d4d/attachment.pgp>
More information about the ffmpeg-devel
mailing list