From 85f38a9765303a79650013591334e89f9047d4e7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 22 Aug 2020 20:46:45 +0200 Subject: [PATCH] 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). --- demux/demux_mf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/demux/demux_mf.c b/demux/demux_mf.c index ef5a5131bd..161e0cb92d 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -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; }