opusparse: Simplify check

Avoids a unset variable warning (for nframes) with gcc 4.7.0
This commit is contained in:
Edward Hervey 2012-05-24 16:22:42 +02:00
parent e1488e5803
commit 150bdc7297

View file

@ -145,7 +145,6 @@ gst_opus_parse_handle_frame (GstBaseParse * base,
unsigned char toc; unsigned char toc;
short frame_sizes[48]; short frame_sizes[48];
int payload_offset; int payload_offset;
int nframes;
int packet_offset = 0; int packet_offset = 0;
gboolean is_header, is_idheader, is_commentheader; gboolean is_header, is_idheader, is_commentheader;
GstMapInfo map; GstMapInfo map;
@ -166,13 +165,14 @@ gst_opus_parse_handle_frame (GstBaseParse * base,
is_header = is_idheader || is_commentheader; is_header = is_idheader || is_commentheader;
if (!is_header) { if (!is_header) {
int nframes;
/* Next, check if there's an Opus packet there */ /* Next, check if there's an Opus packet there */
nframes = nframes =
opus_packet_parse (data, size, &toc, frames, frame_sizes, opus_packet_parse (data, size, &toc, frames, frame_sizes,
&payload_offset); &payload_offset);
}
if (!is_header && nframes < 0) { if (nframes < 0) {
/* Then, check for the test vector framing */ /* Then, check for the test vector framing */
GST_DEBUG_OBJECT (parse, GST_DEBUG_OBJECT (parse,
"No Opus packet found, trying test vector framing"); "No Opus packet found, trying test vector framing");
@ -201,6 +201,7 @@ gst_opus_parse_handle_frame (GstBaseParse * base,
packet_offset = 8; packet_offset = 8;
data += packet_offset; data += packet_offset;
} }
}
if (is_header) { if (is_header) {
*skip = 0; *skip = 0;