Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows crash on %20N #246

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/stream/FFmpegStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,14 @@ bool FFmpegStream::Open(const std::string& streamUrl, const std::string& mimeTyp
if (m_opened)
{
FFmpegLog::SetEnabled(true);
av_dump_format(m_pFormatContext, 0, CURL::GetRedacted(streamUrl).c_str(), 0);
std::string test = CURL::GetRedacted(streamUrl);
Log(LOGLEVEL_DEBUG, "redacted ok");
char* test3 = test.c_str();
Log(LOGLEVEL_DEBUG, "c_str ok");
// Log(LOGLEVEL_DEBUG, "redacted: %s", test.c_str());
std::string test2 = "HelloWorld%20N";
av_dump_format(m_pFormatContext, 0, test2.c_str(), 0);
av_dump_format(m_pFormatContext, 0, test.c_str(), 0);
}
FFmpegLog::SetEnabled(kodi::addon::GetSettingBoolean("allowFFmpegLogging"));

Expand Down Expand Up @@ -355,7 +362,7 @@ DEMUX_PACKET* FFmpegStream::DemuxRead()

if (IsProgramChange())
{
av_dump_format(m_pFormatContext, 0, CURL::GetRedacted(m_streamUrl).c_str(), 0);
// av_dump_format(m_pFormatContext, 0, CURL::GetRedacted(m_streamUrl).c_str(), 0);

// update streams
CreateStreams(m_program);
Expand Down Expand Up @@ -758,9 +765,6 @@ bool FFmpegStream::Open(bool fileinfo)
}
Log(LOGLEVEL_DEBUG, "%s - av_find_stream_info finished", __FUNCTION__);

// print some extra information
av_dump_format(m_pFormatContext, 0, CURL::GetRedacted(strFile).c_str(), 0);

if (m_checkTransportStream)
{
// make sure we start video with an i-frame
Expand Down
4 changes: 2 additions & 2 deletions src/stream/url/URL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,10 @@ std::string CURL::GetWithoutUserDetails(bool redact) const
// if (URIUtils::HasParentInHostname(*this))
// strHostName = CURL(m_strHostName).GetWithoutUserDetails();
// else
strHostName = m_strHostName;
strHostName = m_strHostName;

// if (URIUtils::HasEncodedHostname(*this))
// strHostName = Encode(strHostName);
// strHostName = Encode(strHostName);

if ( HasPort() )
{
Expand Down
Loading