mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
ffmpegdec fix possible memleak (thx DboxOldie)
Origin commit data
------------------
Commit: 2c10634292
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2019-03-04 (Mon, 04 Mar 2019)
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));
|
char buf[200]; av_strerror(r, buf, sizeof(buf));
|
||||||
fprintf(stderr, "%d %s %d: %s\n", __LINE__, __func__,r,buf);
|
fprintf(stderr, "%d %s %d: %s\n", __LINE__, __func__,r,buf);
|
||||||
if (avioc)
|
if (avioc)
|
||||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
|
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100))
|
||||||
av_free(avc->pb);
|
av_free(avioc);
|
||||||
#else
|
#else
|
||||||
avio_context_free(&avioc);
|
avio_context_free(&avioc);
|
||||||
#endif
|
#endif
|
||||||
@@ -211,7 +211,7 @@ void CFfmpegDec::DeInit(void)
|
|||||||
{
|
{
|
||||||
if (avc) {
|
if (avc) {
|
||||||
if (avc->pb)
|
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);
|
av_free(avc->pb);
|
||||||
#else
|
#else
|
||||||
avio_context_free(&avc->pb);
|
avio_context_free(&avc->pb);
|
||||||
|
Reference in New Issue
Block a user