]> git.sesse.net Git - casparcg/commitdiff
2.0.2: Fixed potential divide by zero.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 26 Oct 2011 20:58:19 +0000 (20:58 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 26 Oct 2011 20:58:19 +0000 (20:58 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1479 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

modules/ffmpeg/producer/audio/audio_resampler.cpp

index 179d09cc589e92408df493f59270451deb75104a..9f953f130b7a274a8ed5e645092b1684df6b6146 100644 (file)
@@ -62,7 +62,7 @@ struct audio_resampler::implementation
 \r
        std::vector<int8_t, tbb::cache_aligned_allocator<int8_t>> resample(std::vector<int8_t, tbb::cache_aligned_allocator<int8_t>>&& data)\r
        {\r
-               if(resampler_)\r
+               if(resampler_ && !data.empty())\r
                {\r
                        buffer2_.resize(AVCODEC_MAX_AUDIO_FRAME_SIZE*2);\r
                        auto ret = audio_resample(resampler_.get(),\r