if (gst_matroska_decode_data (context->encodings, &data, &size,
GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME, FALSE)) {
- gst_buffer_unmap (out_buf, &map);
if (data != map.data) {
+ gst_buffer_unmap (out_buf, &map);
gst_buffer_unref (out_buf);
out_buf = gst_buffer_new_wrapped (data, size);
+ } else {
+ gst_buffer_unmap (out_buf, &map);
}
} else {
GST_DEBUG ("decode data failed");
if (gst_matroska_parse_protection_meta (&data, &size, info_protect,
&encrypted)) {
- gst_buffer_unmap (out_buf, &map);
if (data != map.data) {
- GstBuffer *tmp_buf = out_buf;
- out_buf =
- gst_buffer_copy_region (tmp_buf, GST_BUFFER_COPY_ALL,
+ GstBuffer *tmp_buf;
+
+ gst_buffer_unmap (out_buf, &map);
+ tmp_buf = out_buf;
+ out_buf = gst_buffer_copy_region (tmp_buf, GST_BUFFER_COPY_ALL,
gst_buffer_get_size (tmp_buf) - size, size);
gst_buffer_unref (tmp_buf);
if (encrypted)
else
gst_structure_free (info_protect);
} else {
+ gst_buffer_unmap (out_buf, &map);
gst_structure_free (info_protect);
}
} else {
* would be determined again when parsing, but anyway ... */
seeksegment.duration = demux->common.segment.duration;
- flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
- keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
- after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
- before = ! !(flags & GST_SEEK_FLAG_SNAP_BEFORE);
+ flush = !!(flags & GST_SEEK_FLAG_FLUSH);
+ keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
+ after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER);
+ before = !!(flags & GST_SEEK_FLAG_SNAP_BEFORE);
/* always do full update if flushing,
* otherwise problems might arise downstream with missing keyframes etc */
const gchar *matroska_tagname;
const gchar *gstreamer_tagname;
}
+
+ /* *INDENT-OFF* */
tag_conv[] = {
{
/* The following list has the _same_ order as the one in Matroska spec. Please, don't mess it up. */
GST_MATROSKA_TAG_ID_LICENSE, GST_TAG_LICENSE}, { /* The license applied to the content (like Creative Commons variants). */
GST_MATROSKA_TAG_ID_TERMS_OF_USE, GST_TAG_LICENSE}
};
+ /* *INDENT-ON* */
static const struct
{
const gchar *matroska_tagname;
const gchar *gstreamer_tagname;
}
+
+ /* *INDENT-OFF* */
child_tag_conv[] = {
{
"TITLE/SORT_WITH=", GST_TAG_TITLE_SORTNAME}, {
"LICENSE/URL=", GST_TAG_LICENSE_URI}, {
"LICENSE/URL=", GST_TAG_LICENSE_URI}
};
+ /* *INDENT-ON* */
GstFlowReturn ret;
guint32 id;
gchar *value = NULL;