diff options
Diffstat (limited to 'intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp')
-rw-r--r-- | intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp index b79375c2dc5..de0e47300f8 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp @@ -158,21 +158,22 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename) AUD_NEW("buffer") } -AUD_FFMPEGReader::AUD_FFMPEGReader(unsigned char* buffer, int size) +AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer) { m_position = 0; m_pkgbuf_left = 0; m_byteiocontext = (ByteIOContext*)av_mallocz(sizeof(ByteIOContext)); AUD_NEW("byteiocontext") + m_membuffer = buffer; - if(init_put_byte(m_byteiocontext, buffer, size, 0, + if(init_put_byte(m_byteiocontext, buffer.get()->getBuffer(), buffer.get()->getSize(), 0, NULL, NULL, NULL, NULL) != 0) AUD_THROW(AUD_ERROR_FILE); AVProbeData probe_data; probe_data.filename = ""; - probe_data.buf = buffer; - probe_data.buf_size = size; + probe_data.buf = buffer.get()->getBuffer(); + probe_data.buf_size = buffer.get()->getSize(); AVInputFormat* fmt = av_probe_input_format(&probe_data, 1); // open stream |