[BACK]Return to patch-ad CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / audio / akode / patches

File: [cvs.NetBSD.org] / pkgsrc / audio / akode / patches / patch-ad (download)

Revision 1.2, Sun Jun 14 12:46:44 2009 UTC (5 years, 1 month ago) by hasso
Branch: MAIN
CVS Tags: pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, HEAD
Changes since 1.1: +20 -2 lines

Fix build of the ffmpeg plugin.

$NetBSD: patch-ad,v 1.2 2009/06/14 12:46:44 hasso Exp $

--- akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp.orig	2006-08-10 21:37:20 +0300
+++ akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp	2009-06-14 15:14:53 +0300
@@ -26,9 +26,11 @@
 #include "decoder.h"
 
 #include <assert.h>
-#include <ffmpeg/avcodec.h>
-#include <ffmpeg/avformat.h>
-#include <ffmpeg/avio.h>
+extern "C" {
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+#include <libavformat/avio.h>
+}
 
 #include "ffmpeg_decoder.h"
 #include <iostream>
@@ -45,7 +47,7 @@ extern "C" {
         aKode::File *file = (aKode::File*)opaque;
         return file->write((char*)buf, size);
     }
-    static offset_t akode_seek(void* opaque, offset_t pos, int whence)
+    static int64_t akode_seek(void* opaque, int64_t pos, int whence)
     {
         aKode::File *file = (aKode::File*)opaque;
         return file->seek(pos, whence);
@@ -314,7 +316,7 @@ bool FFMPEGDecoder::readFrame(AudioFrame
     assert(d->packet.stream_index == d->audioStream);
 
 retry:
-    int len = avcodec_decode_audio( d->ic->streams[d->audioStream]->codec,
+    int len = avcodec_decode_audio2( d->ic->streams[d->audioStream]->codec,
                                     (short*)d->buffer, &d->buffer_size,
                                     d->packetData, d->packetSize );
 
@@ -349,7 +351,7 @@ retry:
             assert(false);
     }
     if (length == 0) return readFrame(frame);
-    std::cout << "akode: FFMPEG: Frame length: " << length << "\n";
+    // std::cout << "akode: FFMPEG: Frame length: " << length << "\n";
 
     if( d->packetSize <= 0 )
         av_free_packet( &d->packet );