Permalink
Browse files

MythMusic: Fix a segfault introduced by the ffmpeg resync

We now need to explicitly create m_inputContext otherwise there is a segfault
when playing a shoutcast stream.
(cherry picked from commit 4f1962a)

Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
  • Loading branch information...
1 parent 922a9ca commit 4762bb7b1cf12115313194f4be333bb7734da7ed Paul Harrison committed with Beirdo May 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 mythplugins/mythmusic/mythmusic/avfdecoder.cpp
@@ -143,6 +143,11 @@ bool avfDecoder::initialize()
m_inputIsFile = !input()->isSequential();
+ if (m_inputContext)
+ avformat_free_context(m_inputContext);
+
+ m_inputContext = avformat_alloc_context();
+
// open device
if (m_inputIsFile)
{

0 comments on commit 4762bb7

Please sign in to comment.