* Copyright (c) 2000 Fabrice Bellard
* Copyright (c) 2003 Tinic Uro
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
{
int tag, len;
- if (url_feof(pb))
+ if (pb->eof_reached)
return -1;
tag = avio_rl16(pb);
/* skip rectangle size */
nbits = avio_r8(pb) >> 3;
len = (4 * nbits - 3 + 7) / 8;
- url_fskip(pb, len);
+ avio_skip(pb, len);
swf->frame_rate = avio_rl16(pb); /* 8.8 fixed */
avio_rl16(pb); /* frame count */
int tag, len, i, frame, v;
for(;;) {
- uint64_t pos = url_ftell(pb);
+ uint64_t pos = avio_tell(pb);
tag = get_swf_tag(pb, &len);
if (tag < 0)
return AVERROR(EIO);
st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
if (st->codec->codec_id == CODEC_ID_MP3) {
- url_fskip(pb, 4);
+ avio_skip(pb, 4);
av_get_packet(pb, pkt, len-4);
} else { // ADPCM, PCM
av_get_packet(pb, pkt, len);
return pkt->size;
}
skip:
- url_fskip(pb, len);
+ avio_skip(pb, len);
}
- return 0;
}
AVInputFormat ff_swf_demuxer = {
- "swf",
- NULL_IF_CONFIG_SMALL("Flash format"),
- sizeof(SWFContext),
- swf_probe,
- swf_read_header,
- swf_read_packet,
+ .name = "swf",
+ .long_name = NULL_IF_CONFIG_SMALL("Flash format"),
+ .priv_data_size = sizeof(SWFContext),
+ .read_probe = swf_probe,
+ .read_header = swf_read_header,
+ .read_packet = swf_read_packet,
};