Commit 5fb72d7c authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.18.x'

parents f1ca17f6 313d1d5d
...@@ -20,6 +20,10 @@ ver 0.19 (not yet released) ...@@ -20,6 +20,10 @@ ver 0.19 (not yet released)
* the update thread runs at "idle" priority * the update thread runs at "idle" priority
* the output thread runs at "real-time" priority * the output thread runs at "real-time" priority
ver 0.18.8 (not yet released)
* decoder
- ffmpeg: support libav v10_alpha1
ver 0.18.7 (2013/01/13) ver 0.18.7 (2013/01/13)
* playlist * playlist
- pls: fix crash after parser error - pls: fix crash after parser error
......
...@@ -38,6 +38,10 @@ extern "C" { ...@@ -38,6 +38,10 @@ extern "C" {
#include <libavutil/avutil.h> #include <libavutil/avutil.h>
#include <libavutil/log.h> #include <libavutil/log.h>
#include <libavutil/mathematics.h> #include <libavutil/mathematics.h>
#if LIBAVUTIL_VERSION_MAJOR >= 53
#include <libavutil/frame.h>
#endif
} }
#include <assert.h> #include <assert.h>
...@@ -453,7 +457,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) ...@@ -453,7 +457,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
decoder_initialized(decoder, audio_format, decoder_initialized(decoder, audio_format,
input.seekable, total_time); input.seekable, total_time);
#if LIBAVUTIL_VERSION_MAJOR >= 53
AVFrame *frame = av_frame_alloc();
#else
AVFrame *frame = avcodec_alloc_frame(); AVFrame *frame = avcodec_alloc_frame();
#endif
if (!frame) { if (!frame) {
LogError(ffmpeg_domain, "Could not allocate frame"); LogError(ffmpeg_domain, "Could not allocate frame");
avformat_close_input(&format_context); avformat_close_input(&format_context);
...@@ -497,7 +505,9 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) ...@@ -497,7 +505,9 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
} }
} while (cmd != DecoderCommand::STOP); } while (cmd != DecoderCommand::STOP);
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0) #if LIBAVUTIL_VERSION_MAJOR >= 53
av_frame_free(&frame);
#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
avcodec_free_frame(&frame); avcodec_free_frame(&frame);
#else #else
av_freep(&frame); av_freep(&frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment