[FFmpeg-devel] [PATCH] Funcom ISS playback
Michael Niedermayer
michaelni
Sat Jan 17 13:56:23 CET 2009
On Sat, Jan 17, 2009 at 09:30:13AM +0100, Stefan Gehrer wrote:
> Michael Niedermayer wrote:
[...]
>>> + 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);
>>> + }
>> are you ure stereo is not R<->L ? would be more consistent i it is
>
> I rely on the information here from
> http://wiki.multimedia.cx/index.php?title=FunCom_ISS
> And I think I could not tell from the samples at hand what is meant to
> be left and what right.
maybe the author of "http://wiki.multimedia.cx/index.php?title=FunCom_ISS"
could clarify it?
[...]
> +static char *get_token(ByteIOContext *s, char *buf, int maxlen)
> +{
> + int i = 0;
> + char c;
> +
> + while ((c = get_byte(s)) != ' ') {
> + if (i < maxlen-1)
> + buf[i++] = c;
> + }
this can end in an infinite loop
> + buf[i] = 0; /* Ensure null terminated, but may be truncated */
> +
> + return buf;
> +}
the return is not used thus not needed
[...]
> +static int iss_read_header(AVFormatContext *s,
missing av_cold
[...]
> +static int iss_read_packet(AVFormatContext *s,
> + AVPacket *pkt)
> +{
> + IssDemuxContext *iss = s->priv_data;
> + int ret = av_get_packet(s->pb, pkt, iss->packet_size);
> +
> + if(ret < 0)
> + return ret;
> +
> + pkt->stream_index = 0;
> + pkt->pts = url_ftell(s->pb) - iss->sample_start_pos;
> + if(s->streams[0]->codec->channels > 0)
> + pkt->pts /= s->streams[0]->codec->channels*2;
how could channels be <= 0 ?
> + return 0;
> +}
> +
> +AVInputFormat iss_demuxer = {
> + "ISS",
> + "Funcom ISS format",
missing NULL_IF_CONFIG_SMALL()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- 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/8ad68426/attachment.pgp>
More information about the ffmpeg-devel
mailing list