mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
ffmpegdec fix possible memleak (thx DboxOldie)
This commit is contained in:
@@ -192,8 +192,8 @@ bool CFfmpegDec::Init(void *_in, const CFile::FileType /* ft */)
|
||||
char buf[200]; av_strerror(r, buf, sizeof(buf));
|
||||
fprintf(stderr, "%d %s %d: %s\n", __LINE__, __func__,r,buf);
|
||||
if (avioc)
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
|
||||
av_free(avc->pb);
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100))
|
||||
av_free(avioc);
|
||||
#else
|
||||
avio_context_free(&avioc);
|
||||
#endif
|
||||
@@ -211,7 +211,7 @@ void CFfmpegDec::DeInit(void)
|
||||
{
|
||||
if (avc) {
|
||||
if (avc->pb)
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100))
|
||||
av_free(avc->pb);
|
||||
#else
|
||||
avio_context_free(&avc->pb);
|
||||
|
Reference in New Issue
Block a user