diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-02-26 02:03:24 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-03-04 16:14:07 +0400 |
commit | 9c60f574f0b4073ebb8a9aa295113abe0c3fb912 (patch) | |
tree | d8d316a27e03d0cc8724533e9131e878b22e4c84 | |
parent | eba0dd2112ef1ed379b2291dbb43a5c1d9922cc6 (diff) |
Request ICY metadata from ShoutCast HTTP Servers
-rw-r--r-- | demuxer/Demuxers/LAVFDemuxer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/demuxer/Demuxers/LAVFDemuxer.cpp b/demuxer/Demuxers/LAVFDemuxer.cpp index 7a3789f3..409db466 100644 --- a/demuxer/Demuxers/LAVFDemuxer.cpp +++ b/demuxer/Demuxers/LAVFDemuxer.cpp @@ -241,8 +241,13 @@ trynoformat: if (!m_pSettings->GetLoadMatroskaExternalSegments()) m_avFormat->flags |= AVFMT_FLAG_NOEXTERNAL; + // demuxer/protocol options + AVDictionary *options = nullptr; + av_dict_set(&options, "icy", "1", 0); // request ICY metadata + m_timeOpening = time(nullptr); - ret = avformat_open_input(&m_avFormat, fileName, inputFormat, nullptr); + ret = avformat_open_input(&m_avFormat, fileName, inputFormat, &options); + av_dict_free(&options); if (ret < 0) { DbgLog((LOG_ERROR, 0, TEXT("::OpenInputStream(): avformat_open_input failed (%d)"), ret)); if (format) { |