Mercurial > libavcodec.hg
comparison apedec.c @ 12023:c7455450364d libavcodec
apedec: add flush function
author | mru |
---|---|
date | Wed, 30 Jun 2010 09:33:59 +0000 |
parents | 7dd2a45249a9 |
children |
comparison
equal
deleted
inserted
replaced
12022:bf2a317342a2 | 12023:c7455450364d |
---|---|
875 bytes_used = s->samples ? s->ptr - s->last_ptr : buf_size; | 875 bytes_used = s->samples ? s->ptr - s->last_ptr : buf_size; |
876 s->last_ptr = s->ptr; | 876 s->last_ptr = s->ptr; |
877 return bytes_used; | 877 return bytes_used; |
878 } | 878 } |
879 | 879 |
880 static void ape_flush(AVCodecContext *avctx) | |
881 { | |
882 APEContext *s = avctx->priv_data; | |
883 s->samples= 0; | |
884 } | |
885 | |
880 AVCodec ape_decoder = { | 886 AVCodec ape_decoder = { |
881 "ape", | 887 "ape", |
882 AVMEDIA_TYPE_AUDIO, | 888 AVMEDIA_TYPE_AUDIO, |
883 CODEC_ID_APE, | 889 CODEC_ID_APE, |
884 sizeof(APEContext), | 890 sizeof(APEContext), |
885 ape_decode_init, | 891 ape_decode_init, |
886 NULL, | 892 NULL, |
887 ape_decode_close, | 893 ape_decode_close, |
888 ape_decode_frame, | 894 ape_decode_frame, |
889 .capabilities = CODEC_CAP_SUBFRAMES, | 895 .capabilities = CODEC_CAP_SUBFRAMES, |
896 .flush = ape_flush, | |
890 .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), | 897 .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), |
891 }; | 898 }; |