• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/mediastreamer/0001-misc-fixes.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Fix linphone compile with newer ffmpeg versions, downloaded from
2
https://github.com/dankamongmen/mediastreamer2/commit/4f438eb8e132a3119284be771e0daad143597ebd
3
​
4
Fixes
5
http://autobuild.buildroot.net/results/b72/b72b1f6287986af3d686cc3c8b9c1b3fd9419d29/
6
​
7
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
8
​
9
​
10
From 4f438eb8e132a3119284be771e0daad143597ebd Mon Sep 17 00:00:00 2001
11
From: nick black <nick.black@sprezzatech.com>
12
Date: Mon, 28 Jan 2013 23:54:17 -0500
13
Subject: [PATCH] adapt to new libav API
14
​
15
---
16
 src/utils/ffmpeg-priv.h       | 1 +
17
 src/videofilters/h264dec.c    | 6 +++---
18
 src/videofilters/jpegwriter.c | 6 +++---
19
 src/videofilters/nowebcam.c   | 6 +++---
20
 src/videofilters/videodec.c   | 8 ++++----
21
 src/videofilters/videoenc.c   | 6 +++---
22
 6 files changed, 17 insertions(+), 16 deletions(-)
23
​
24
diff --git a/src/utils/ffmpeg-priv.h b/src/utils/ffmpeg-priv.h
25
index 0eab098..a405c05 100644
26
--- a/src/utils/ffmpeg-priv.h
27
+++ b/src/utils/ffmpeg-priv.h
28
@@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
29
 /* new layout */
30
 # include <libavcodec/avcodec.h>
31
 # include <libavutil/avutil.h>
32
+# include <libavutil/mem.h>
33
 #else
34
 /* old layout */
35
 # include <ffmpeg/avcodec.h>
36
diff --git a/src/videofilters/h264dec.c b/src/videofilters/h264dec.c
37
index 5229b5e..7059634 100644
38
--- a/src/videofilters/h264dec.c
39
+++ b/src/videofilters/h264dec.c
40
@@ -58,10 +58,10 @@ static void dec_open(DecData *d){
41
    int error;
42
    codec=avcodec_find_decoder(CODEC_ID_H264);
43
    if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg.");
44
-   avcodec_get_context_defaults(&d->av_context);
45
-   error=avcodec_open(&d->av_context,codec);
46
+   avcodec_get_context_defaults3(&d->av_context, codec);
47
+   error=avcodec_open2(&d->av_context,codec, NULL);
48
    if (error!=0){
49
-       ms_fatal("avcodec_open() failed.");
50
+       ms_fatal("avcodec_open2() failed.");
51
    }
52
 }
53
 
54
diff --git a/src/videofilters/jpegwriter.c b/src/videofilters/jpegwriter.c
55
index cca79c5..daf3cdb 100644
56
--- a/src/videofilters/jpegwriter.c
57
+++ b/src/videofilters/jpegwriter.c
58
@@ -90,7 +90,7 @@ static void jpg_process(MSFilter *f){
59
            mblk_t *jpegm;
60
            struct SwsContext *sws_ctx;
61
            
62
-           AVCodecContext *avctx=avcodec_alloc_context();
63
+           AVCodecContext *avctx=avcodec_alloc_context3(NULL);
64
            
65
            avctx->width=yuvbuf.w;
66
            avctx->height=yuvbuf.h;
67
@@ -98,9 +98,9 @@ static void jpg_process(MSFilter *f){
68
            avctx->time_base.den =1;
69
            avctx->pix_fmt=PIX_FMT_YUVJ420P;
70
 
71
-           error=avcodec_open(avctx,s->codec);
72
+           error=avcodec_open2(avctx,s->codec,NULL);
73
            if (error!=0) {
74
-               ms_error("avcodec_open() failed: %i",error);
75
+               ms_error("avcodec_open2() failed: %i",error);
76
                cleanup(s,NULL);
77
                av_free(avctx);
78
                return;
79
diff --git a/src/videofilters/nowebcam.c b/src/videofilters/nowebcam.c
80
index f1c10de..b45f89f 100644
81
--- a/src/videofilters/nowebcam.c
82
+++ b/src/videofilters/nowebcam.c
83
@@ -68,9 +68,9 @@ static mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize){
84
        return NULL;
85
    }
86
 
87
-   avcodec_get_context_defaults(&av_context);
88
-   if (avcodec_open(&av_context,codec)<0){
89
-       ms_error("jpeg2yuv: avcodec_open failed");
90
+   avcodec_get_context_defaults3(&av_context,NULL);
91
+   if (avcodec_open2(&av_context,codec,NULL)<0){
92
+       ms_error("jpeg2yuv: avcodec_open2 failed");
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.