View | Details | Raw Unified | Return to bug 209375
Collapse All | Expand All

(-)multimedia/ffmpeg2theora/Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	ffmpeg2theora
4
PORTNAME=	ffmpeg2theora
5
PORTVERSION=	0.29
5
PORTVERSION=	0.30
6
PORTREVISION=	2
7
CATEGORIES=	multimedia
6
CATEGORIES=	multimedia
8
MASTER_SITES=	http://v2v.cc/~j/ffmpeg2theora/downloads/
7
MASTER_SITES=	http://v2v.cc/~j/ffmpeg2theora/downloads/
9
8
(-)multimedia/ffmpeg2theora/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (ffmpeg2theora-0.29.tar.bz2) = 214110e2a5afdd8ff8e0be18152e893dbff5dabc1ae1d1124e64d9f93eae946d
1
SHA256 (ffmpeg2theora-0.30.tar.bz2) = 4f6464b444acab5d778e0a3359d836e0867a3dcec4ad8f1cdcf87cb711ccc6df
2
SIZE (ffmpeg2theora-0.29.tar.bz2) = 90143
2
SIZE (ffmpeg2theora-0.30.tar.bz2) = 91269
(-)multimedia/ffmpeg2theora/files/patch-SConstruct (-4 / +4 lines)
Lines 1-6 Link Here
1
--- SConstruct.orig	2012-06-25 17:15:16 UTC
1
--- SConstruct.orig	2016-01-10 04:35:56 UTC
2
+++ SConstruct
2
+++ SConstruct
3
@@ -37,7 +37,7 @@ opts.AddVariables(
3
@@ -38,7 +38,7 @@ opts.AddVariables(
4
   BoolVariable('libkate', 'enable libkate support', 1),
4
   BoolVariable('libkate', 'enable libkate support', 1),
5
   BoolVariable('crossmingw', 'Set to 1 for crosscompile with mingw', 0)
5
   BoolVariable('crossmingw', 'Set to 1 for crosscompile with mingw', 0)
6
 )
6
 )
Lines 9-15 Link Here
9
 Help(opts.GenerateHelpText(env))
9
 Help(opts.GenerateHelpText(env))
10
 
10
 
11
 pkg_flags="--cflags --libs"
11
 pkg_flags="--cflags --libs"
12
@@ -151,7 +151,6 @@ if not env.GetOption('clean'):
12
@@ -152,7 +152,6 @@ if not env.GetOption('clean'):
13
       "libavcodec >= 52.30.0",
13
       "libavcodec >= 52.30.0",
14
       "libpostproc",
14
       "libpostproc",
15
       "libswscale",
15
       "libswscale",
Lines 17-23 Link Here
17
       "libavutil",
17
       "libavutil",
18
   ]
18
   ]
19
   if os.path.exists("./ffmpeg"):
19
   if os.path.exists("./ffmpeg"):
20
@@ -200,9 +199,8 @@ if not env.GetOption('clean'):
20
@@ -214,9 +213,8 @@ if not env.GetOption('clean'):
21
       env.Append(CCFLAGS=[
21
       env.Append(CCFLAGS=[
22
         '-DHAVE_ICONV'
22
         '-DHAVE_ICONV'
23
       ])
23
       ])
(-)multimedia/ffmpeg2theora/files/patch-ffmpeg2 (-40 lines)
Lines 1-40 Link Here
1
commit d3435a6a83dc656379de9e6523ecf8d565da6ca6
2
Author: Jan Gerber <j@xiph.org>
3
Date:   Sun May 26 15:25:42 2013 +0200
4
5
    don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
6
7
diff --git src/ffmpeg2theora.c.orig src/ffmpeg2theora.c
8
index cde63b9..8bebf28 100644
9
--- src/ffmpeg2theora.c
10
+++ src/ffmpeg2theora.c
11
@@ -47,6 +47,9 @@
12
 #include "ffmpeg2theora.h"
13
 #include "avinfo.h"
14
 
15
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
16
+
17
+
18
 #define LENGTH(x) (sizeof(x) / sizeof(*x))
19
 
20
 enum {
21
@@ -1069,8 +1072,8 @@ void ff2theora_output(ff2theora this) {
22
         int first = 1;
23
         int audio_eos = 0, video_eos = 0, audio_done = 0, video_done = 0;
24
         int ret;
25
-        int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
26
-        int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
27
+        int16_t *audio_buf=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
28
+        int16_t *resampled=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
29
         int16_t *audio_p=NULL;
30
         int no_frames;
31
         int no_samples;
32
@@ -1531,7 +1534,7 @@ void ff2theora_output(ff2theora this) {
33
                 while((audio_eos && !audio_done) || avpkt.size > 0 ) {
34
                     int samples=0;
35
                     int samples_out=0;
36
-                    int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
37
+                    int data_size = 4*MAX_AUDIO_FRAME_SIZE;
38
                     int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt);
39
 
40
                     if (avpkt.size > 0) {
(-)multimedia/ffmpeg2theora/files/patch-src-subtitles.c (-11 lines)
Lines 1-11 Link Here
1
--- src/subtitles.c.orig	2011-09-15 20:20:46 UTC
2
+++ src/subtitles.c
3
@@ -284,7 +284,7 @@ static char *convert_subtitle_to_utf8(co
4
       return NULL;
5
     }
6
     outptr=newtext;
7
-    if (iconv(cd, &inptr, &insz, &outptr, &outsz) < 0) {
8
+    if (iconv(cd, &inptr, &insz, &outptr, &outsz) == (size_t)-1) {
9
       warn(frontend, NULL, 0, "Failed to convert text to UTF-8\n");
10
       free(newtext);
11
       newtext = NULL;
(-)multimedia/ffmpeg2theora/files/patch-src__ffmpeg2theora.c (-14 lines)
Lines 1-14 Link Here
1
--- src/ffmpeg2theora.c.orig	2012-01-29 17:00:19.000000000 +0900
2
+++ src/ffmpeg2theora.c	2012-07-04 01:49:09.000000000 +0900
3
@@ -2970,7 +2970,11 @@
4
                 fprintf(stderr,"\nUnable to decode input.\n");
5
             return(1);
6
         }
7
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53,17,0)
8
+        av_close_input_file(convert->context);
9
+#else
10
         avformat_close_input(&convert->context);
11
+#endif
12
     }
13
     else{
14
         if (info.frontend)
(-)multimedia/ffmpeg2theora/files/patch-src_ffmpeg2theora.c (+14 lines)
Line 0 Link Here
1
--- src/ffmpeg2theora.c.orig	2016-01-10 04:35:56 UTC
2
+++ src/ffmpeg2theora.c
3
@@ -3103,7 +3103,11 @@ int main(int argc, char **argv) {
4
                 fprintf(stderr,"\nUnable to decode input.\n");
5
             return(1);
6
         }
7
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53,17,0)
8
+        av_close_input_file(convert->context);
9
+#else
10
         avformat_close_input(&convert->context);
11
+#endif
12
     }
13
     else{
14
         if (info.frontend)
(-)multimedia/ffmpeg2theora/files/patch-src_subtitles.c (+11 lines)
Line 0 Link Here
1
--- src/subtitles.c.orig	2016-01-10 04:35:56 UTC
2
+++ src/subtitles.c
3
@@ -284,7 +284,7 @@ static char *convert_subtitle_to_utf8(co
4
       return NULL;
5
     }
6
     outptr=newtext;
7
-    if (iconv(cd, &inptr, &insz, &outptr, &outsz) < 0) {
8
+    if (iconv(cd, &inptr, &insz, &outptr, &outsz) == (size_t)-1) {
9
       warn(frontend, NULL, 0, "Failed to convert text to UTF-8\n");
10
       free(newtext);
11
       newtext = NULL;

Return to bug 209375