add av_dict_free, fix memleak

Origin commit data
------------------
Branch: ni/coolstream
Commit: a830d0d587
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-04-04 (Mon, 04 Apr 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2016-04-04 15:38:51 +02:00
parent 3a65fe75be
commit 9a77db4fb1
2 changed files with 8 additions and 0 deletions

View File

@@ -2083,8 +2083,12 @@ bool CStreamRec::Open(CZapitChannel * channel)
if (avformat_open_input(&ifcx, url.c_str(), NULL, &options) != 0) {
printf("%s: Cannot open input [%s]!\n", __FUNCTION__, url.c_str());
if (!headers.empty())
av_dict_free(&options);
return false;
}
if (!headers.empty())
av_dict_free(&options);
if (avformat_find_stream_info(ifcx, NULL) < 0) {
printf("%s: Cannot find stream info [%s]!\n", __FUNCTION__, channel->getUrl().c_str());