mirror of https://github.com/mpv-player/mpv
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:
parent
c06577e291
commit
85f38a9765
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue