diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2008-08-14 19:38:39 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2008-08-14 19:38:39 +0000 |
commit | 1e8bd10c579615dde74fe02c797cc4beeeb29ad1 (patch) | |
tree | 4b13fe7629d1953ff6315589bde1e6efdec5ae74 /libavcodec | |
parent | 07be55dc8b47159f7e84bc201ad9702eae17ec4f (diff) | |
download | ffmpeg-1e8bd10c579615dde74fe02c797cc4beeeb29ad1.tar.gz |
mlp: Define End-of-Stream code in common header file and use it in decoder.
Originally committed as revision 14763 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mlp.h | 3 | ||||
-rw-r--r-- | libavcodec/mlpdec.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h index a434cd1a22..bbb09e0b5a 100644 --- a/libavcodec/mlp.h +++ b/libavcodec/mlp.h @@ -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 --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 421abdece1..7272458085 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -990,7 +990,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, 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) |