summaryrefslogtreecommitdiffstats
path: root/k9author/k9avidecode.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-06 14:10:23 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-06 14:10:23 -0500
commit0e824732db028517232f1f699ba68b2c79d5dc50 (patch)
treebcc2a6ffa97ac1cc7a8141296bfd33cd51fa91b4 /k9author/k9avidecode.cpp
parenteffa31d902975a70f5856ee03b951f5b26054447 (diff)
downloadk9copy-0e824732db028517232f1f699ba68b2c79d5dc50.tar.gz
k9copy-0e824732db028517232f1f699ba68b2c79d5dc50.zip
Fix another crash casued by old av_packet_free routine
Diffstat (limited to 'k9author/k9avidecode.cpp')
-rw-r--r--k9author/k9avidecode.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/k9author/k9avidecode.cpp b/k9author/k9avidecode.cpp
index 77f8d2b..a3a23c6 100644
--- a/k9author/k9avidecode.cpp
+++ b/k9author/k9avidecode.cpp
@@ -40,7 +40,7 @@ int glibref=0;
#ifdef NEW_FFMPEG
#ifdef NEEDS_AV_FREE_PACKET
-void av_free_packet(AVPacket *pkt)
+void av_free_packet_internal(AVPacket *pkt)
{
if (pkt) {
if (pkt->destruct) pkt->destruct(pkt);
@@ -121,6 +121,9 @@ k9AviDecode::k9AviDecode(TQObject *parent, const char *name)
errs << i18n("Cannot open the library %1").arg("libswscale");
# endif
av_free = (av_free_t)dlsym(CodecHandle,"av_free");
+ av_free_packet = (av_free_packet_t)dlsym(CodecHandle,"av_free_packet");
+ if (av_free_packet==0)
+ av_free_packet=av_free_packet_internal;
avcodec_close = (avcodec_close_t)dlsym(FormatHandle,"avcodec_close");
# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
avformat_close_input = (avformat_close_input_t)dlsym(FormatHandle,"avformat_close_input");