aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-02 21:15:37 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-02 21:15:37 +0000
commit184e5f86cea9a0c92a660fe4d33f0aad701d29d7 (patch)
treec149848ae5439709886e1879b12e8be592d8ab34 /src
parentaab3498cd5925b564f450b3586e7bb16cb9a9f49 (diff)
downloadqmmp-184e5f86cea9a0c92a660fe4d33f0aad701d29d7.tar.gz
qmmp-184e5f86cea9a0c92a660fe4d33f0aad701d29d7.tar.bz2
qmmp-184e5f86cea9a0c92a660fe4d33f0aad701d29d7.zip
ffmpeg: fixed freezing on some corrupted files
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8837 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
index 83b26ac5b..662c403db 100644
--- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
+++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -452,14 +452,17 @@ void DecoderFFmpeg::fillBuffer()
if(m_pkt.stream_index != audioIndex)
{
+ m_temp_pkt.size = 0;
if(m_pkt.data)
+ {
#if (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,24,102)) //ffmpeg-3.0
av_packet_unref(&m_pkt);
#else
av_free_packet(&m_pkt);
#endif
- m_temp_pkt.size = 0;
- continue;
+ continue;
+ }
+ return;
}
if(m_seekTime && c->codec_id == AV_CODEC_ID_APE)