[FFmpeg-devel] [PATCH] Funcom ISS playback

Michael Niedermayer michaelni
Sat Jan 17 18:50:52 CET 2009


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


[...]
> +        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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- 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/0a886885/attachment.pgp>



More information about the ffmpeg-devel mailing list