From: Josh Coalson Date: Thu, 25 Sep 2003 04:09:44 +0000 (+0000) Subject: add OggFLAC__ogg_decoder_aspect_reset() X-Git-Tag: 1.2.0~1008 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efd81fcbf13e9b1a5b69cbdf1e3bbcd1be127277;p=platform%2Fupstream%2Fflac.git add OggFLAC__ogg_decoder_aspect_reset() --- diff --git a/src/libOggFLAC/include/private/ogg_decoder_aspect.h b/src/libOggFLAC/include/private/ogg_decoder_aspect.h index a5292e1..1f535f1 100644 --- a/src/libOggFLAC/include/private/ogg_decoder_aspect.h +++ b/src/libOggFLAC/include/private/ogg_decoder_aspect.h @@ -53,6 +53,7 @@ void OggFLAC__ogg_decoder_aspect_set_defaults(OggFLAC__OggDecoderAspect *aspect) FLAC__bool OggFLAC__ogg_decoder_aspect_init(OggFLAC__OggDecoderAspect *aspect); void OggFLAC__ogg_decoder_aspect_finish(OggFLAC__OggDecoderAspect *aspect); void OggFLAC__ogg_decoder_aspect_flush(OggFLAC__OggDecoderAspect *aspect); +void OggFLAC__ogg_decoder_aspect_reset(OggFLAC__OggDecoderAspect *aspect); typedef FLAC__StreamDecoderReadStatus (*OggFLAC__OggDecoderAspectReadCallbackProxy)(void *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data); diff --git a/src/libOggFLAC/ogg_decoder_aspect.c b/src/libOggFLAC/ogg_decoder_aspect.c index a8c1f15..970c734 100644 --- a/src/libOggFLAC/ogg_decoder_aspect.c +++ b/src/libOggFLAC/ogg_decoder_aspect.c @@ -77,7 +77,13 @@ void OggFLAC__ogg_decoder_aspect_set_defaults(OggFLAC__OggDecoderAspect *aspect) void OggFLAC__ogg_decoder_aspect_flush(OggFLAC__OggDecoderAspect *aspect) { - (void)ogg_sync_clear(&aspect->sync_state); + OggFLAC__ogg_decoder_aspect_reset(aspect); +} + +void OggFLAC__ogg_decoder_aspect_reset(OggFLAC__OggDecoderAspect *aspect) +{ + (void)ogg_stream_reset(&aspect->sync_state); + (void)ogg_sync_reset(&aspect->sync_state); } OggFLAC__OggDecoderAspectReadStatus OggFLAC__ogg_decoder_aspect_read_callback_wrapper(OggFLAC__OggDecoderAspect *aspect, FLAC__byte buffer[], unsigned *bytes, OggFLAC__OggDecoderAspectReadCallbackProxy read_callback, void *decoder, void *client_data)