From: Mark Nauwelaerts Date: Mon, 11 Oct 2010 15:06:48 +0000 (+0200) Subject: flacparse: fix parsing with unknown framesizes X-Git-Tag: 1.19.3~509^2~7136^2~912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a7f899f6e15d3aa1e8558507c3f1f1b45a62b0c;p=platform%2Fupstream%2Fgstreamer.git flacparse: fix parsing with unknown framesizes Fixes #631814 (mostly). --- diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index ec6a248..7b70fe1 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -588,8 +588,12 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse, GstBuffer * buffer, goto need_more; } + /* mind unknown framesize */ search_start = MAX (2, flacparse->min_framesize); - search_end = MIN (size, flacparse->max_framesize + 9 + 2); + if (flacparse->max_framesize) + search_end = MIN (size, flacparse->max_framesize + 9 + 2); + else + search_end = size; search_end -= 2; remaining = size;