demux_mf: actually report errors

Well, whatever. Only results in an error message being printed, because
there is no other error reporting mechanism, and the general policy is
to keep trying with the rest of the data (i.e. not report EOF).
This commit is contained in:
wm4 2020-08-22 20:46:45 +02:00
parent c06577e291
commit 85f38a9765
1 changed files with 6 additions and 0 deletions

View File

@ -194,6 +194,7 @@ static bool demux_mf_read_packet(struct demuxer *demuxer,
mf_t *mf = demuxer->priv;
if (mf->curr_frame >= mf->nr_of_files)
return false;
bool ok = false;
struct stream *entry_stream = NULL;
if (mf->streams)
@ -218,6 +219,7 @@ static bool demux_mf_read_packet(struct demuxer *demuxer,
dp->keyframe = true;
dp->stream = mf->sh->index;
*pkt = dp;
ok = true;
}
}
talloc_free(data.start);
@ -227,6 +229,10 @@ static bool demux_mf_read_packet(struct demuxer *demuxer,
free_stream(stream);
mf->curr_frame++;
if (!ok)
MP_ERR(demuxer, "error reading image file\n");
return true;
}