* Smacker demuxer
* Copyright (c) 2006 Konstantin Shishkov
*
- * 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
*/
((int32_t*)st->codec->extradata)[3] = av_le2ne32(smk->type_size);
smk->curstream = -1;
- smk->nextpos = url_ftell(pb);
+ smk->nextpos = avio_tell(pb);
return 0;
}
int i;
int frame_size = 0;
int palchange = 0;
- int pos;
- if (url_feof(s->pb) || smk->cur_frame >= smk->frames)
+ if (s->pb->eof_reached || smk->cur_frame >= smk->frames)
return AVERROR_EOF;
/* if we demuxed all streams, pass another frame */
frame_size = smk->frm_size[smk->cur_frame] & (~3);
flags = smk->frm_flags[smk->cur_frame];
/* handle palette change event */
- pos = url_ftell(s->pb);
if(flags & SMACKER_PAL){
int size, sz, t, off, j, pos;
uint8_t *pal = smk->pal;
frame_size -= size;
frame_size--;
sz = 0;
- pos = url_ftell(s->pb) + size;
+ pos = avio_tell(s->pb) + size;
while(sz < 256){
t = avio_r8(s->pb);
if(t & 0x80){ /* skip palette entries */
pkt->stream_index = smk->videoindex;
pkt->size = ret + 769;
smk->cur_frame++;
- smk->nextpos = url_ftell(s->pb);
+ smk->nextpos = avio_tell(s->pb);
} else {
if (av_new_packet(pkt, smk->buf_sizes[smk->curstream]))
return AVERROR(ENOMEM);
}
AVInputFormat ff_smacker_demuxer = {
- "smk",
- NULL_IF_CONFIG_SMALL("Smacker video"),
- sizeof(SmackerContext),
- smacker_probe,
- smacker_read_header,
- smacker_read_packet,
- smacker_read_close,
+ .name = "smk",
+ .long_name = NULL_IF_CONFIG_SMALL("Smacker video"),
+ .priv_data_size = sizeof(SmackerContext),
+ .read_probe = smacker_probe,
+ .read_header = smacker_read_header,
+ .read_packet = smacker_read_packet,
+ .read_close = smacker_read_close,
};