return AVERROR_INVALIDDATA;
}
-static int ffm_resync(AVFormatContext *s, int state)
+static int ffm_resync(AVFormatContext *s, uint32_t state)
{
av_log(s, AV_LOG_ERROR, "resyncing\n");
while (state != PACKET_ID) {
{
FFMContext *ffm = s->priv_data;
AVIOContext *pb = s->pb;
- int len, fill_size, size1, frame_offset, id;
+ int len, fill_size, size1, frame_offset;
+ uint32_t id;
int64_t last_pos = -1;
size1 = size;
if (len > size)
len = size;
if (len == 0) {
- if (avio_tell(pb) == ffm->file_size)
- if (ffm->server_attached)
+ if (avio_tell(pb) == ffm->file_size) {
+ if (ffm->server_attached) {
avio_seek(pb, ffm->packet_size, SEEK_SET);
- else
+ } else
return AVERROR_EOF;
+ }
retry_read:
if (pb->buffer_size != ffm->packet_size) {
int64_t tell = avio_tell(pb);