qtdemux: playback interrupt when reverse video
Submitted by Chenglin Ye
Link to original bug (#794101)
Description
Created attachment 369369
Fix media interruption issue when reverse video
I tried to reverse MJPEG format video, but it got media interruption error, and log shown that "This file is invalid and cannot be played.", I found the position of the log, as follow:
source code(qtdemux.c):
747 if (qtdemux->state != QTDEMUX_STATE_MOVIE && qtdemux->got_moov) {
748 /* we're pulling header but already got most interesting bits,
749 * so never mind the rest (e.g. tags) (that much) */
750 GST_WARNING_OBJECT (qtdemux, "atom has bogus size %" G_GUINT64_FORMAT,
751 size);
752 return GST_FLOW_EOS;
753 } else {
754 GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX,
755 (_("This file is invalid and cannot be played.")),
756 ("atom has bogus size %" G_GUINT64_FORMAT, size));
757 return GST_FLOW_ERROR;
758 }
759 }
746 if (G_UNLIKELY (size > QTDEMUX_MAX_ATOM_SIZE)) {However, if (qtdemux->state == QTDEMUX_STATE_MOVIE && qtdemux->got_moov) is TRUE, could we consider that the file is invalid?
test video URL:https://cinelerra-cv.org/footage/grill-mjpeg.mov
Patch 369369, "Fix media interruption issue when reverse video":
0001-qtdemux-add-judgment-condition-when-catch-bogus-size.patch
Version: 1.12.x