[FFmpeg-devel] [PATCH] Funcom ISS playback
Stefan Gehrer
stefan.gehrer
Sat Jan 17 20:10:40 CET 2009
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.
Stefan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: funcomiss.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090117/a05eb97b/attachment.txt>
More information about the ffmpeg-devel
mailing list