From: <mn...@ke...> - 2010-10-11 15:23:35
|
Module: gst-plugins-bad Branch: master Commit: 11bdf1def1dbc1e9fa37ab725497897489ecb700 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=11bdf1def1dbc1e9fa37ab725497897489ecb700 Author: Mark Nauwelaerts <mar...@co...> Date: Mon Oct 11 17:06:48 2010 +0200 flacparse: fix parsing with unknown framesizes Fixes #631814 (mostly). --- gst/audioparsers/gstflacparse.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) 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; |