diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index d24e4bb282..f039efca6e 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -1069,13 +1069,9 @@ gst_ogg_mux_get_headers (GstOggPadData * pad) GST_LOG_OBJECT (thepad, "streamheader is not fixed list"); } - /* Start a new page for every CMML buffer */ - if (gst_structure_has_name (structure, "text/x-cmml")) - pad->always_flush_page = TRUE; } else if (gst_structure_has_name (structure, "video/x-dirac")) { res = g_list_append (res, pad->buffer); pad->buffer = NULL; - pad->always_flush_page = TRUE; } else { GST_LOG_OBJECT (thepad, "caps don't have streamheader"); } @@ -1246,9 +1242,6 @@ gst_ogg_mux_send_headers (GstOggMux * mux) hbufs = g_list_append (hbufs, hbuf); } - if (gst_structure_has_name (structure, "video/x-dirac")) { - pad->always_flush_page = TRUE; - } gst_caps_unref (caps); } @@ -1494,7 +1487,8 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best) tmpbuf = NULL; /* we flush when we see a new keyframe */ - force_flush = (pad->prev_delta && !delta_unit) || pad->always_flush_page; + force_flush = (pad->prev_delta && !delta_unit) + || pad->map.always_flush_page; if (duration != -1) { pad->duration += duration; /* if page duration exceeds max, flush page */ diff --git a/ext/ogg/gstoggmux.h b/ext/ogg/gstoggmux.h index ec94224d85..3edc1f5b51 100644 --- a/ext/ogg/gstoggmux.h +++ b/ext/ogg/gstoggmux.h @@ -83,8 +83,6 @@ typedef struct gint64 keyframe_granule; /* granule of last preceding keyframe */ GstPadEventFunction collect_event; - - gboolean always_flush_page; } GstOggPadData; diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 77f39d44ae..5c9ae296a2 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -474,6 +474,7 @@ setup_dirac_mapper (GstOggStream * pad, ogg_packet * packet) } pad->is_video = TRUE; + pad->always_flush_page = TRUE; pad->granulerate_n = header.frame_rate_numerator * 2; pad->granulerate_d = header.frame_rate_denominator; pad->granuleshift = 22; @@ -1668,6 +1669,7 @@ setup_cmml_mapper (GstOggStream * pad, ogg_packet * packet) GST_DEBUG ("blocksize1: %u", 1 << (data[0] & 0x0F)); pad->caps = gst_caps_new_simple ("text/x-cmml", NULL); + pad->always_flush_page = TRUE; pad->is_sparse = TRUE; return TRUE; @@ -1729,6 +1731,7 @@ setup_kate_mapper (GstOggStream * pad, ogg_packet * packet) } pad->is_sparse = TRUE; + pad->always_flush_page = TRUE; return TRUE; } diff --git a/ext/ogg/gstoggstream.h b/ext/ogg/gstoggstream.h index b45c88a285..6f4a3f8c8f 100644 --- a/ext/ogg/gstoggstream.h +++ b/ext/ogg/gstoggstream.h @@ -73,6 +73,8 @@ struct _GstOggStream GstCaps *caps; gboolean is_video; + gboolean always_flush_page; + /* vorbis stuff */ int nln_increments[4]; int nsn_increment;