Hi,if i specify pcm_s24le on output audio codec, consumer_avformat wrongly calculate a number of output samples and as result audio encoding function failed because of resulted packed buffer size greater then submitted.
-- ________________________________________ Maksym Veremeyenko
>From 80a60f7b4764331e9e99f1fa470fae468deccfa4 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko <ve...@m1.tv> Date: Sun, 16 Feb 2014 17:41:44 +0200 Subject: [PATCH 3/4] fix samples number calculation for 24 and 32 bit output audio --- src/modules/avformat/consumer_avformat.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 9ab69ec..6b8cb1f 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -709,6 +709,18 @@ static int open_audio( mlt_properties properties, AVFormatContext *oc, AVStream case AV_CODEC_ID_PCM_U16BE: audio_input_frame_size >>= 1; break; + case AV_CODEC_ID_PCM_S24LE: + case AV_CODEC_ID_PCM_S24BE: + case AV_CODEC_ID_PCM_U24LE: + case AV_CODEC_ID_PCM_U24BE: + audio_input_frame_size /= 3; + break; + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_U32LE: + case AV_CODEC_ID_PCM_U32BE: + audio_input_frame_size >>= 2; + break; default: break; } -- 1.7.7.6
------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel