* 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 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 */
if(smk->curstream < 0) {
- url_fseek(s->pb, smk->nextpos, 0);
+ avio_seek(s->pb, smk->nextpos, 0);
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);
+ pos = avio_tell(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 */
sz++;
}
}
- url_fseek(s->pb, pos, 0);
+ avio_seek(s->pb, pos, 0);
palchange |= 1;
}
flags >>= 1;
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);