diff options
| author | William Grzybowski <wg@FreeBSD.org> | 2013-10-19 16:43:32 +0000 |
|---|---|---|
| committer | William Grzybowski <wg@FreeBSD.org> | 2013-10-19 16:43:32 +0000 |
| commit | 3624ddf181da71b2f213d44844a13f92e7088879 (patch) | |
| tree | 69155a2473ecd42904d8ae76e85c62fefb67950b /audio/sox/files/patch-ffmpeg | |
| parent | - Rename patch files (diff) | |
multimedia/ffmpeg: update to 2.0.1
- Update main ffmpeg port to 2.0.1
- Bump and update dependent ports when necessary (API change)
Approved by: portmgr (bapt)
Notes
Notes:
svn path=/head/; revision=330909
Diffstat (limited to 'audio/sox/files/patch-ffmpeg')
| -rw-r--r-- | audio/sox/files/patch-ffmpeg | 66 |
1 files changed, 11 insertions, 55 deletions
diff --git a/audio/sox/files/patch-ffmpeg b/audio/sox/files/patch-ffmpeg index fd511e7348cc..b7c642126f6b 100644 --- a/audio/sox/files/patch-ffmpeg +++ b/audio/sox/files/patch-ffmpeg @@ -1,55 +1,11 @@ -*** diff - -Update to use the new ffmpeg library API, but still work with -the old one. - ---- src/ffmpeg.c 2011-06-07 00:29:34.000000000 -0500 -+++ src/ffmpeg.c 2011-06-07 00:34:12.830996927 -0500 -@@ -50,6 +50,11 @@ - #include <ctype.h> - #include "ffmpeg.h" - -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 64, 0) -+#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO -+#define AV_PKT_FLAG_KEY PKT_FLAG_KEY -+#endif -+ - /* Private data for ffmpeg files */ - typedef struct { - int audio_index; -@@ -91,7 +96,7 @@ static int stream_component_open(priv_t - - if (!codec || avcodec_open(enc, codec) < 0) - return -1; -- if (enc->codec_type != CODEC_TYPE_AUDIO) { -+ if (enc->codec_type != AVMEDIA_TYPE_AUDIO) { - lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type); - return -1; - } -@@ -182,7 +187,7 @@ static int startread(sox_format_t * ft) - /* Find audio stream (FIXME: allow different stream to be selected) */ - for (i = 0; (unsigned)i < ffmpeg->ctxt->nb_streams; i++) { - AVCodecContext *enc = ffmpeg->ctxt->streams[i]->codec; -- if (enc->codec_type == CODEC_TYPE_AUDIO && ffmpeg->audio_index < 0) { -+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO && ffmpeg->audio_index < 0) { - ffmpeg->audio_index = i; - break; - } -@@ -273,7 +278,7 @@ static AVStream *add_audio_stream(sox_fo - - c = st->codec; - c->codec_id = codec_id; -- c->codec_type = CODEC_TYPE_AUDIO; -+ c->codec_type = AVMEDIA_TYPE_AUDIO; - - /* put sample parameters */ - c->bit_rate = 256000; /* FIXME: allow specification */ -@@ -423,7 +428,7 @@ static size_t write_samples(sox_format_t - av_init_packet(&pkt); - pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples); - pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, ffmpeg->audio_st->time_base); -- pkt.flags |= PKT_FLAG_KEY; -+ pkt.flags |= AV_PKT_FLAG_KEY; - pkt.stream_index = ffmpeg->audio_st->index; - pkt.data = ffmpeg->audio_buf_aligned; - +--- src/ffmpeg.h.orig ++++ src/ffmpeg.h +@@ -27,6 +27,8 @@ + #include <ffmpeg/avformat.h> + #endif + ++#include <libavutil/mathematics.h> ++ + #if defined __SUNPRO_C + #pragma enable_warn + #elif defined _MSC_VER |
