]> git.sesse.net Git - mlt/commitdiff
fix samples number calculation for 24 and 32 bit output
authorMaksym Veremeyenko <verem@m1.tv>
Mon, 17 Feb 2014 08:55:48 +0000 (10:55 +0200)
committerDan Dennedy <dan@dennedy.org>
Mon, 17 Feb 2014 16:01:29 +0000 (08:01 -0800)
src/modules/avformat/consumer_avformat.c

index 8776de886f43e90288b7725cf082865f1456a6fa..b4753fa94c7b74c539c7f9ed4539472352264501 100644 (file)
@@ -709,6 +709,20 @@ static int open_audio( mlt_properties properties, AVFormatContext *oc, AVStream
                                case AV_CODEC_ID_PCM_U16BE:
                                        audio_input_frame_size >>= 1;
                                        break;
+#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(59<<8)+0)
+                               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;
+#endif
                                default:
                                        break;
                        }