mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 20:31:20 +00:00
gst/avi/gstavidemux.c: Catch short reads, like they might happen with truncated files (see #305279); remove unnecessa...
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_process_next_entry): Catch short reads, like they might happen with truncated files (see #305279); remove unnecessary indentation.
This commit is contained in:
parent
59bc72774d
commit
6bad19a588
2 changed files with 36 additions and 22 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/avi/gstavidemux.c: (gst_avi_demux_process_next_entry):
|
||||
Catch short reads, like they might happen with truncated
|
||||
files (see #305279); remove unnecessary indentation.
|
||||
|
||||
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/avi/gstavidemux.c: (gst_avi_demux_invert):
|
||||
|
|
|
@ -2457,9 +2457,17 @@ gst_avi_demux_process_next_entry (GstAviDemux * avi)
|
|||
}
|
||||
|
||||
if ((res = gst_pad_pull_range (avi->sinkpad, entry->offset +
|
||||
avi->index_offset, entry->size, &buf)) != GST_FLOW_OK)
|
||||
avi->index_offset, entry->size, &buf)) != GST_FLOW_OK) {
|
||||
return res;
|
||||
else {
|
||||
}
|
||||
|
||||
if (GST_BUFFER_SIZE (buf) < entry->size) {
|
||||
GST_WARNING_OBJECT (avi, "Short read at offset %" G_GUINT64_FORMAT
|
||||
", only got %d/%d bytes (truncated file?)", entry->offset +
|
||||
avi->index_offset, GST_BUFFER_SIZE (buf), entry->size);
|
||||
goto eos;
|
||||
}
|
||||
|
||||
if (stream->strh->fcc_handler == GST_MAKE_FOURCC ('D', 'I', 'B', ' ')) {
|
||||
buf = gst_avi_demux_invert (stream, buf);
|
||||
}
|
||||
|
@ -2480,7 +2488,7 @@ gst_avi_demux_process_next_entry (GstAviDemux * avi)
|
|||
return res;
|
||||
}
|
||||
processed = TRUE;
|
||||
}
|
||||
|
||||
next:
|
||||
stream->current_frame = entry->frames_before + 1;
|
||||
stream->current_byte = entry->bytes_before + entry->size;
|
||||
|
|
Loading…
Reference in a new issue