diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2015-07-06 13:11:00 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2015-07-07 11:18:06 +0300 |
commit | 2f016f3f9dd4c3bbf5f5de24ab2e866466bb7a3b (patch) | |
tree | c645eeac65e267d5fff132134f6df2bd8d9f71b5 | |
parent | 439f98ed9a31c836da97176b58663a4a8fe64f0b (diff) |
rtph261pay: Fix uninitialized variable compiler error
endpos variable does not correctly understand in the
4.6.3 GCC version. So compile error appears when we do
compile rtph261pay using jhbuild.
This patch is fixed the compile error in 4.6.3 GCC version.
https://bugzilla.gnome.org/show_bug.cgi?id=751985
-rw-r--r-- | gst/rtp/gstrtph261pay.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/rtp/gstrtph261pay.c b/gst/rtp/gstrtph261pay.c index 98b2fc2bd..4c43cfcf3 100644 --- a/gst/rtp/gstrtph261pay.c +++ b/gst/rtp/gstrtph261pay.c @@ -668,23 +668,18 @@ parse_mb_until_pos (GstRtpH261Pay * pay, GstBitReader * br, Gob * gob, gint count = 0; gboolean stop = FALSE; guint maxpos = *endpos; + Macroblock mb; GST_LOG_OBJECT (pay, "Parse until pos %u, start at pos %u, gobn %d, mba %d", maxpos, gst_bit_reader_get_pos (br), gob->gn, gob->last.mba); while (!stop) { - Macroblock mb; - ret = parse_mb (pay, br, &gob->last, &mb); switch (ret) { case PARSE_OK: if (mb.endpos > maxpos && count > 0) { /* Don't include current MB */ - GST_DEBUG_OBJECT (pay, - "Split GOBN %d after MBA %d (endpos %u, maxpos %u, nextpos %u)", - gob->gn, gob->last.mba, *endpos, maxpos, mb.endpos); - gst_bit_reader_set_pos (br, *endpos); stop = TRUE; } else { /* Update to include current MB */ @@ -724,6 +719,13 @@ parse_mb_until_pos (GstRtpH261Pay * pay, GstBitReader * br, Gob * gob, } gob->last.gobn = gob->gn; + if(ret == PARSE_OK) { + GST_DEBUG_OBJECT (pay, + "Split GOBN %d after MBA %d (endpos %u, maxpos %u, nextpos %u)", + gob->gn, gob->last.mba, *endpos, maxpos, mb.endpos); + gst_bit_reader_set_pos (br, *endpos); + } + return ret; } |