mpegaudioparse: Fix buffer memory leak during failures

mapped buffer is not being unmapped during failures

https://bugzilla.gnome.org/show_bug.cgi?id=756231
This commit is contained in:
Vineeth TM 2015-10-12 10:48:23 +09:00 committed by Sebastian Dröge
parent 6eb8db8afd
commit fb7783f8b0

View file

@ -435,7 +435,7 @@ gst_mp3parse_validate_extended (GstMpegAudioParse * mp3parse, GstBuffer * buf,
if (G_UNLIKELY (!bpf)) {
GST_DEBUG_OBJECT (mp3parse, "next header invalid (bitrate 0)");
*valid = FALSE;
return TRUE;
goto cleanup;
}
offset += bpf;
@ -673,7 +673,7 @@ gst_mpeg_audio_parse_handle_frame (GstBaseParse * parse,
/* not enough data */
gst_base_parse_set_min_frame_size (parse, valid);
*skipsize = 0;
return FALSE;
goto cleanup;
} else {
GST_DEBUG_OBJECT (parse, "determined freeform size %d", valid);
mp3parse->freerate = valid;
@ -685,7 +685,7 @@ gst_mpeg_audio_parse_handle_frame (GstBaseParse * parse,
if (!bpf) {
/* did not come up with valid freeform length, reject after all */
*skipsize = 1;
return FALSE;
goto cleanup;
}
}