guint64 block_duration, duration_diff = 0;
gboolean is_video_keyframe = FALSE;
gboolean is_video_invisible = FALSE;
- gboolean is_audio_only = FALSE;
+ gboolean is_audio_only = FALSE, is_audio = FALSE;
gboolean is_min_duration_reached = FALSE;
gboolean is_max_duration_exceeded = FALSE;
GstMatroskamuxPad *pad;
buffer_timestamp += mux->cluster_timestamp_offset;
is_audio_only = gst_matroska_pads_is_audio_only (mux);
+ is_audio = collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_AUDIO;
is_min_duration_reached = (mux->min_cluster_duration == 0
|| (buffer_timestamp > mux->cluster_time
flags |= 0x08;
if (mux->doctype_version > 1 && !write_duration && !cmeta) {
- if (is_video_keyframe)
+ if (is_video_keyframe || is_audio)
flags |= 0x80;
hdr =
#define compare_buffer_to_data(buffer, data, data_size) \
G_STMT_START { \
-fail_unless_equals_int (data_size, gst_buffer_get_size (buffer)); \
-fail_unless (gst_buffer_memcmp (buffer, 0, data, data_size) == 0); \
+ fail_unless_equals_int (data_size, gst_buffer_get_size (buffer)); \
+ fail_unless (gst_buffer_memcmp (buffer, 0, data, data_size) == 0);\
} G_STMT_END
static void
GST_START_TEST (test_block_group_v2)
{
- guint8 data0_v2[] = { 0xa3, 0x85, 0x81, 0x00, 0x01, 0x00 };
+ guint8 data0_v2[] = { 0xa3, 0x85, 0x81, 0x00, 0x01, 0x80 };
test_block_group_with_version (2, data0_v2, sizeof (data0_v2));
}
{
GstBuffer *inbuffer, *outbuffer;
guint8 data_h0[] = {
- 0xa3, 0x85, 0x81, 0x00, 0x00, 0x00,
+ 0xa3, 0x85, 0x81, 0x00, 0x00, 0x80,
};
guint8 data_h1[] = {
- 0xa3, 0x85, 0x81, 0x00, 0x01, 0x00,
+ 0xa3, 0x85, 0x81, 0x00, 0x01, 0x80,
};
GstHarness *h = setup_matroskamux_harness (AC3_CAPS_STRING);