gst/mpegstream/gstmpegparse.c: Declare variables at the beginning of a block and make

Original commit message from CVS:
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_pad_added),
(gst_mpeg_parse_handle_src_query):
Declare variables at the beginning of a block and make
gcc-2.9x happy (fixes #328957; patch by: Jens Granseuer).
This commit is contained in:
Jens Granseuer 2006-03-01 12:35:09 +00:00 committed by Tim-Philipp Müller
parent 3de20e5147
commit b06e084912
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2006-03-01 Tim-Philipp Müller <tim at centricular dot net>
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_pad_added),
(gst_mpeg_parse_handle_src_query):
Declare variables at the beginning of a block and make
gcc-2.9x happy (fixes #328957; patch by: Jens Granseuer).
2006-03-01 Tim-Philipp Müller <tim at centricular dot net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_handle_data):

View file

@ -455,6 +455,7 @@ static void
gst_mpeg_parse_pad_added (GstElement * element, GstPad * pad)
{
GstMPEGParse *mpeg_parse;
GstEvent *event;
if (GST_PAD_IS_SINK (pad)) {
return;
@ -466,7 +467,7 @@ gst_mpeg_parse_pad_added (GstElement * element, GstPad * pad)
* the current time. This is required because MPEG allows any sort
* of order of packets, and new substreams can be found at any
* time. */
GstEvent *event = gst_event_new_new_segment (FALSE,
event = gst_event_new_new_segment (FALSE,
mpeg_parse->current_segment.rate,
GST_FORMAT_TIME, mpeg_parse->current_segment.start,
-1, mpeg_parse->current_segment.start);
@ -1016,6 +1017,8 @@ gst_mpeg_parse_handle_src_query (GstPad * pad, GstQuery * query)
}
case GST_QUERY_POSITION:
{
gint64 cur;
gst_query_parse_position (query, &format, NULL);
switch (format) {
@ -1030,8 +1033,7 @@ gst_mpeg_parse_handle_src_query (GstPad * pad, GstQuery * query)
goto done;
}
gint64 cur =
(gint64) (mpeg_parse->current_scr) - mpeg_parse->first_scr;
cur = (gint64) (mpeg_parse->current_scr) - mpeg_parse->first_scr;
src_value = MPEGTIME_TO_GSTTIME (MAX (0, cur));
break;
}