# HG changeset patch # User ramiro # Date 1218742719 0 # Node ID d73cd240d68c132e776addcf0a08d42316c87553 # Parent 27ee0ceab1504cec939c024690b0c9018329bb34 mlp: Define End-of-Stream code in common header file and use it in decoder. diff -r 27ee0ceab150 -r d73cd240d68c mlp.h --- a/mlp.h Thu Aug 14 16:07:17 2008 +0000 +++ b/mlp.h Thu Aug 14 19:38:39 2008 +0000 @@ -56,6 +56,9 @@ */ #define MAX_FILTER_ORDER 8 +/** Code that signals end of a stream. */ +#define END_OF_STREAM 0xd234d234 + #define FIR 0 #define IIR 1 diff -r 27ee0ceab150 -r d73cd240d68c mlpdec.c --- a/mlpdec.c Thu Aug 14 16:07:17 2008 +0000 +++ b/mlpdec.c Thu Aug 14 19:38:39 2008 +0000 @@ -990,7 +990,7 @@ skip_bits(&gb, (-get_bits_count(&gb)) & 15); if (substream_data_len[substr] * 8 - get_bits_count(&gb) >= 32 && - (show_bits_long(&gb, 32) == 0xd234d234 || + (show_bits_long(&gb, 32) == END_OF_STREAM || show_bits_long(&gb, 20) == 0xd234e)) { skip_bits(&gb, 18); if (substr == m->max_decoded_substream)