mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
asfdemux: mo_size check bug fix. mo_size is not mandatory field.
So, don't need to check previous payload's mo_size and current payload's mo_size when merging it. https://bugzilla.gnome.org/show_bug.cgi?id=710609
This commit is contained in:
parent
3de558d96b
commit
1e74f611ee
1 changed files with 6 additions and 3 deletions
9
gst/asfdemux/asfpacket.c
Normal file → Executable file
9
gst/asfdemux/asfpacket.c
Normal file → Executable file
|
@ -374,6 +374,8 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
|
||||||
GST_TIME_ARGS (payload.ts));
|
GST_TIME_ARGS (payload.ts));
|
||||||
GST_LOG_OBJECT (demux, "media object dur : %" GST_TIME_FORMAT,
|
GST_LOG_OBJECT (demux, "media object dur : %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (payload.duration));
|
GST_TIME_ARGS (payload.duration));
|
||||||
|
} else if (payload.rep_data_len == 0) {
|
||||||
|
payload.mo_size = 0;
|
||||||
} else if (payload.rep_data_len != 0) {
|
} else if (payload.rep_data_len != 0) {
|
||||||
GST_WARNING_OBJECT (demux, "invalid replicated data length, very bad");
|
GST_WARNING_OBJECT (demux, "invalid replicated data length, very bad");
|
||||||
*p_data += payload_len;
|
*p_data += payload_len;
|
||||||
|
@ -407,9 +409,10 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
|
||||||
AsfPayload *prev;
|
AsfPayload *prev;
|
||||||
|
|
||||||
if ((prev = asf_payload_find_previous_fragment (&payload, stream))) {
|
if ((prev = asf_payload_find_previous_fragment (&payload, stream))) {
|
||||||
if (prev->buf == NULL || payload.mo_size != prev->mo_size ||
|
if (prev->buf == NULL || (payload.mo_size > 0
|
||||||
payload.mo_offset >= gst_buffer_get_size (prev->buf) ||
|
&& payload.mo_size != prev->mo_size)
|
||||||
payload.mo_offset + payload_len >
|
|| payload.mo_offset >= gst_buffer_get_size (prev->buf)
|
||||||
|
|| payload.mo_offset + payload_len >
|
||||||
gst_buffer_get_size (prev->buf)) {
|
gst_buffer_get_size (prev->buf)) {
|
||||||
GST_WARNING_OBJECT (demux, "Offset doesn't match previous data?!");
|
GST_WARNING_OBJECT (demux, "Offset doesn't match previous data?!");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue