]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/audio/audio_decoder.cpp
2.0.2: - graph: Fixed potential buffer overflow.
[casparcg] / modules / ffmpeg / producer / audio / audio_decoder.cpp
index e7c71bb72139846003127ab554a9e932aa14d8aa..1ac7fdeaa796fe61c3db3c1602f62b11e747ca5a 100644 (file)
@@ -1,22 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\r
 *\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
 *\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
 *\r
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+\r
 #include "../../stdafx.h"\r
 \r
 #include "audio_decoder.h"\r
@@ -135,9 +137,9 @@ public:
                return packets_.size() > 10;\r
        }\r
 \r
-       int64_t nb_frames() const\r
+       uint32_t nb_frames() const\r
        {\r
-               return std::max<int64_t>(nb_frames_, file_frame_number_);\r
+               return 0;//std::max<int64_t>(nb_frames_, file_frame_number_);\r
        }\r
 };\r
 \r
@@ -145,7 +147,7 @@ audio_decoder::audio_decoder(const safe_ptr<AVFormatContext>& context, const cor
 void audio_decoder::push(const std::shared_ptr<AVPacket>& packet){impl_->push(packet);}\r
 bool audio_decoder::ready() const{return impl_->ready();}\r
 std::shared_ptr<core::audio_buffer> audio_decoder::poll(){return impl_->poll();}\r
-int64_t audio_decoder::nb_frames() const{return impl_->nb_frames();}\r
-size_t audio_decoder::file_frame_number() const{return impl_->file_frame_number_;}\r
+uint32_t audio_decoder::nb_frames() const{return impl_->nb_frames();}\r
+uint32_t audio_decoder::file_frame_number() const{return impl_->file_frame_number_;}\r
 \r
 }}
\ No newline at end of file