mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-22 19:24:22 -04:00
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
$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 );
|