[Av] Corrected bug in codec context name retrieval

This commit is contained in:
emeric
2014-12-01 20:04:46 +01:00
parent 9af5ee25d7
commit d695a544b6
+3 -3
View File
@@ -44,10 +44,10 @@ CodecContext::dumpInfo(std::ostream& ost) const
std::string
CodecContext::getCodecDesc(void) const
{
std::vector<char> buf(256, 0);
avcodec_string(&buf[0], buf.size(), _codecContext, 0);
std::array<char, 256> buf;
avcodec_string(buf.data(), buf.size(), _codecContext, 0);
return std::string(buf.begin(), buf.end());
return std::string(buf.data());
}
} // namespace Av