Line 0
Link Here
|
|
|
1 |
--- ffmpeg.c.orig 2015-07-13 10:00:56 UTC |
2 |
+++ ffmpeg.c |
3 |
@@ -39,7 +39,7 @@ |
4 |
#include <libavformat/avio.h> |
5 |
#include <libswresample/swresample.h> |
6 |
#include <libavutil/opt.h> |
7 |
-#include <libavutil/audioconvert.h> |
8 |
+#include <libavutil/channel_layout.h> |
9 |
#ifndef AVUTIL_MATHEMATICS_H |
10 |
#include <libavutil/mathematics.h> |
11 |
#endif |
12 |
@@ -347,7 +347,7 @@ static int ffmpeg_fill_buffer(AVFormatCo |
13 |
struct ffmpeg_output *output, SwrContext *swr) |
14 |
{ |
15 |
#if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) |
16 |
- AVFrame *frame = avcodec_alloc_frame(); |
17 |
+ AVFrame *frame = av_frame_alloc(); |
18 |
int got_frame; |
19 |
#endif |
20 |
while (1) { |
21 |
@@ -363,7 +363,7 @@ static int ffmpeg_fill_buffer(AVFormatCo |
22 |
if (av_read_frame(ic, &input->pkt) < 0) { |
23 |
/* Force EOF once we can read no longer. */ |
24 |
#if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) |
25 |
- avcodec_free_frame(&frame); |
26 |
+ av_frame_free(&frame); |
27 |
#endif |
28 |
return 0; |
29 |
} |
30 |
@@ -426,7 +426,7 @@ static int ffmpeg_fill_buffer(AVFormatCo |
31 |
res = 0; |
32 |
output->buffer_pos = output->buffer; |
33 |
output->buffer_used_len = res * cc->channels * sizeof(int16_t); |
34 |
- avcodec_free_frame(&frame); |
35 |
+ av_frame_free(&frame); |
36 |
return output->buffer_used_len; |
37 |
} |
38 |
#endif |
39 |
@@ -566,7 +566,7 @@ static long ffmpeg_current_bitrate(struc |
40 |
long bitrate = -1; |
41 |
#if (LIBAVFORMAT_VERSION_INT > ((51<<16)+(43<<8)+0)) |
42 |
/* ape codec returns silly numbers */ |
43 |
- if (priv->codec->id == CODEC_ID_APE) |
44 |
+ if (priv->codec->id == AV_CODEC_ID_APE) |
45 |
return -1; |
46 |
#endif |
47 |
if (priv->input->curr_duration > 0) { |