From: Sebastian Dröge Date: Wed, 11 Jun 2008 11:27:46 +0000 (+0000) Subject: gst/matroska/matroska-mux.c: Update the counter for the number of streams when pads... X-Git-Tag: 1.19.3~509^2~11193 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ad81019a2976c6f40afc43ca6bc8d3caf7e6896;p=platform%2Fupstream%2Fgstreamer.git gst/matroska/matroska-mux.c: Update the counter for the number of streams when pads are added or removed. This will m... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_request_new_pad), (gst_matroska_mux_release_pad), (gst_matroska_mux_write_data): Update the counter for the number of streams when pads are added or removed. This will make sure that a seek table is generated for files with just one audio stream. --- diff --git a/ChangeLog b/ChangeLog index 493dfef..2a17862 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-06-11 Sebastian Dröge + * gst/matroska/matroska-mux.c: (gst_matroska_mux_request_new_pad), + (gst_matroska_mux_release_pad), (gst_matroska_mux_write_data): + Update the counter for the number of streams when pads are added or + removed. This will make sure that a seek table is generated for + files with just one audio stream. + +2008-06-11 Sebastian Dröge + * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_metadata_id_simple_tag): * gst/matroska/matroska-ids.h: diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 7715402..1c83b5a 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -1219,6 +1219,7 @@ gst_matroska_mux_request_new_pad (GstElement * element, gst_pad_set_setcaps_function (newpad, setcapsfunc); gst_pad_set_active (newpad, TRUE); gst_element_add_pad (element, newpad); + mux->num_streams++; return newpad; } @@ -1261,6 +1262,7 @@ gst_matroska_mux_release_pad (GstElement * element, GstPad * pad) gst_matroska_pad_free (collect_pad); gst_collect_pads_remove_pad (mux->collect, pad); gst_element_remove_pad (element, pad); + mux->num_streams--; return; } } @@ -1950,6 +1952,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad) * for audio only files. This can be largely improved, such as doing * one for each keyframe or each second (for all-keyframe * streams), only the *first* video track. But that'll come later... */ + if (is_video_keyframe) { GstMatroskaIndex *idx;