summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyeJin Choi <meeshel@meeshel78@hotmail.com>2013-10-22 16:02:04 +0900
committerThiago Santos <ts.santos@partner.samsung.com>2013-10-29 12:08:50 -0300
commit1a15655fd5ad46209ad0a893c752f58b575fd398 (patch)
tree009f985750786e5e04d306d8eb92130b265fe408
parent55bdfe401e82a3487facd584816e5cc270e53049 (diff)
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
-rwxr-xr-x[-rw-r--r--]gst/asfdemux/asfpacket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/asfdemux/asfpacket.c b/gst/asfdemux/asfpacket.c
index ecf1e056..7379d861 100644..100755
--- a/gst/asfdemux/asfpacket.c
+++ b/gst/asfdemux/asfpacket.c
@@ -374,6 +374,8 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
GST_TIME_ARGS (payload.ts));
GST_LOG_OBJECT (demux, "media object dur : %" GST_TIME_FORMAT,
GST_TIME_ARGS (payload.duration));
+ } else if (payload.rep_data_len == 0) {
+ payload.mo_size = 0;
} else if (payload.rep_data_len != 0) {
GST_WARNING_OBJECT (demux, "invalid replicated data length, very bad");
*p_data += payload_len;
@@ -407,9 +409,10 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
AsfPayload *prev;
if ((prev = asf_payload_find_previous_fragment (&payload, stream))) {
- if (prev->buf == NULL || payload.mo_size != prev->mo_size ||
- payload.mo_offset >= gst_buffer_get_size (prev->buf) ||
- payload.mo_offset + payload_len >
+ if (prev->buf == NULL || (payload.mo_size > 0
+ && payload.mo_size != prev->mo_size)
+ || payload.mo_offset >= gst_buffer_get_size (prev->buf)
+ || payload.mo_offset + payload_len >
gst_buffer_get_size (prev->buf)) {
GST_WARNING_OBJECT (demux, "Offset doesn't match previous data?!");
} else {