From d695a544b68a3a48806c79113563f2dcd49d3329 Mon Sep 17 00:00:00 2001 From: emeric Date: Mon, 1 Dec 2014 20:04:46 +0100 Subject: [PATCH] [Av] Corrected bug in codec context name retrieval --- src/av/CodecContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/av/CodecContext.cpp b/src/av/CodecContext.cpp index 2c176da2..1f9ee44c 100644 --- a/src/av/CodecContext.cpp +++ b/src/av/CodecContext.cpp @@ -44,10 +44,10 @@ CodecContext::dumpInfo(std::ostream& ost) const std::string CodecContext::getCodecDesc(void) const { - std::vector buf(256, 0); - avcodec_string(&buf[0], buf.size(), _codecContext, 0); + std::array buf; + avcodec_string(buf.data(), buf.size(), _codecContext, 0); - return std::string(buf.begin(), buf.end()); + return std::string(buf.data()); } } // namespace Av