mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
Ignore bogus index entries
Original commit message from CVS: Ignore bogus index entries Assume all audio frames are keyframes
This commit is contained in:
parent
514729bbba
commit
98ae5cb270
1 changed files with 11 additions and 3 deletions
|
@ -602,7 +602,7 @@ gst_avi_demux_strf_iavs (GstAviDemux *avi_demux)
|
|||
static void
|
||||
gst_avi_debug_entry (const gchar *prefix, gst_avi_index_entry *entry)
|
||||
{
|
||||
GST_DEBUG (0, "%s: %05d %d %08llx %05d %08lld %08x %08x (%d) %08x", prefix, entry->index_nr, entry->stream_nr,
|
||||
GST_DEBUG (0, "%s: %05d %d %08llx %05d %14lld %08x %08x (%d) %08x", prefix, entry->index_nr, entry->stream_nr,
|
||||
entry->bytes_before, entry->frames_before, entry->ts, entry->flags, entry->offset,
|
||||
entry->offset, entry->size);
|
||||
}
|
||||
|
@ -664,6 +664,11 @@ gst_avi_demux_parse_index (GstAviDemux *avi_demux,
|
|||
GstFormat format;
|
||||
|
||||
stream_nr = CHUNKID_TO_STREAMNR (entry[i].id);
|
||||
if (stream_nr > avi_demux->num_streams || stream_nr < 0) {
|
||||
avi_demux->index_entries[i].stream_nr = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
target->stream_nr = stream_nr;
|
||||
stream = &avi_demux->stream[stream_nr];
|
||||
|
||||
|
@ -677,6 +682,9 @@ gst_avi_demux_parse_index (GstAviDemux *avi_demux,
|
|||
|
||||
format = GST_FORMAT_TIME;
|
||||
if (stream->strh.type == GST_RIFF_FCC_auds) {
|
||||
/* all audio frames are keyframes */
|
||||
target->flags |= GST_RIFF_IF_KEYFRAME;
|
||||
|
||||
gst_pad_convert (stream->pad, GST_FORMAT_BYTES, stream->total_bytes,
|
||||
&format, &target->ts);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue