[FFmpeg-devel] [PATCH 01/15] lavc/adpcm: THP: handle packets with sample counts not divisible by 14

Michael Niedermayer michaelni at gmx.at
Sat Jun 20 16:47:50 CEST 2015


On Sat, Jun 20, 2015 at 05:01:13AM -0500, Rodger Combs wrote:
> ---
>  libavcodec/adpcm.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> index 22b5468..1b35029 100644
> --- a/libavcodec/adpcm.c
> +++ b/libavcodec/adpcm.c
> @@ -642,9 +642,17 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
>          }
>          has_coded_samples = 1;
>          bytestream2_skip(gb, 4); // channel size
> -        *coded_samples  = bytestream2_get_be32(gb);
> -        *coded_samples -= *coded_samples % 14;
> -        nb_samples      = (buf_size - (8 + 36 * ch)) / (8 * ch) * 14;
> +        *coded_samples  = (avctx->codec->id == AV_CODEC_ID_ADPCM_THP_LE) ?
> +                          bytestream2_get_le32(gb) :
> +                          bytestream2_get_be32(gb);

i moved this to the first patch

both applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150620/f3417294/attachment.asc>


More information about the ffmpeg-devel mailing list