flvdemux: remove static keyword from variables that shouldn't be static

Multiple flvparse/flvdemux instances should be able to operate without
trampling over each other by accidentally re-using the same (static)
variables. (Spotted by Mark Nauwelaerts)
This commit is contained in:
Tim-Philipp Müller 2010-02-19 00:39:50 +00:00
parent 07fa73f199
commit ec9add84a8

View file

@ -424,8 +424,8 @@ gst_flv_parse_tag_script (GstFLVDemux * demux, GstBuffer * buffer)
&& !demux->random_access) {
/* If an index was found and we're in push mode, insert associations */
for (i = 0; i < MIN (demux->times->len, demux->filepositions->len); i++) {
GstIndexAssociation associations[2];
guint64 time, fileposition;
static GstIndexAssociation associations[2];
time = g_array_index (demux->times, gdouble, i) * GST_SECOND;
fileposition = g_array_index (demux->filepositions, gdouble, i);
@ -437,8 +437,7 @@ gst_flv_parse_tag_script (GstFLVDemux * demux, GstBuffer * buffer)
associations[1].value = fileposition;
gst_index_add_associationv (demux->index, demux->index_id,
GST_ASSOCIATION_FLAG_KEY_UNIT, 2,
(const GstIndexAssociation *) &associations);
GST_ASSOCIATION_FLAG_KEY_UNIT, 2, associations);
}
demux->indexed = TRUE;
}
@ -1249,7 +1248,8 @@ gst_flv_parse_tag_timestamp (GstFLVDemux * demux, GstBuffer * buffer,
if (demux->index && !demux->indexed && (type == 9 || (type == 8
&& !demux->has_video))) {
static GstIndexAssociation associations[2];
GstIndexAssociation associations[2];
GST_LOG_OBJECT (demux,
"adding association %" GST_TIME_FORMAT "-> %" G_GUINT64_FORMAT,
GST_TIME_ARGS (ret), demux->offset);
@ -1261,7 +1261,7 @@ gst_flv_parse_tag_timestamp (GstFLVDemux * demux, GstBuffer * buffer,
gst_index_add_associationv (demux->index, demux->index_id,
(keyframe) ? GST_ASSOCIATION_FLAG_KEY_UNIT : GST_ASSOCIATION_FLAG_NONE,
2, (const GstIndexAssociation *) &associations);
2, associations);
}
if (demux->duration == GST_CLOCK_TIME_NONE || demux->duration < ret)