• 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/freerdp/0004-ffmpeg30.patch
Bernd KuhlsBernd Kuhls committed eedc206b76902 Jul 2016
Raw file
Source viewDiff to previous
 
1
From b7b66968f93f6ce75dd06d12638e14029bf3717b Mon Sep 17 00:00:00 2001
2
From: Alexis Ballier <aballier@gentoo.org>
3
Date: Thu, 17 Sep 2015 10:36:44 +0200
4
Subject: [PATCH] channels/tsmf/client/ffmpeg: Fix build with ffmpeg git
5
 master.
6
​
7
Replace old, deprecated and now removed, APIs with their new equivalent while retaining backward compatibility with old ffmpeg versions.
8
​
9
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
10
[Downloaded from upstream commit:
11
 https://github.com/FreeRDP/FreeRDP/commit/f8ceb3f6061583c650bd4f6cddc10bc0471f2076]
12
---
13
 channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 17 ++++++++++++++++-
14
 1 file changed, 16 insertions(+), 1 deletion(-)
15
​
16
diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
17
index d0880e7..e1b9f83 100644
18
--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
19
+++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
20
@@ -61,6 +61,9 @@
21
 #define AV_CODEC_ID_AC3 CODEC_ID_AC3
22
 #endif
23
 
24
+#if LIBAVUTIL_VERSION_MAJOR < 52
25
+#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
26
+#endif
27
 
28
 typedef struct _TSMFFFmpegDecoder
29
 {
30
@@ -102,7 +105,11 @@ static BOOL tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_MED
31
    mdecoder->codec_context->bit_rate = media_type->BitRate;
32
    mdecoder->codec_context->time_base.den = media_type->SamplesPerSecond.Numerator;
33
    mdecoder->codec_context->time_base.num = media_type->SamplesPerSecond.Denominator;
34
+#if LIBAVCODEC_VERSION_MAJOR < 55
35
    mdecoder->frame = avcodec_alloc_frame();
36
+#else
37
+   mdecoder->frame = av_frame_alloc();
38
+#endif
39
    return TRUE;
40
 }
41
 
42
@@ -328,7 +335,11 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE *data, UI
43
        if (!mdecoder->decoded_data)
44
            return FALSE;
45
 
46
+#if LIBAVCODEC_VERSION_MAJOR < 55
47
        frame = avcodec_alloc_frame();
48
+#else
49
+       frame = av_frame_alloc();
50
+#endif
51
        avpicture_fill((AVPicture*) frame, mdecoder->decoded_data,
52
                       mdecoder->codec_context->pix_fmt,
53
                       mdecoder->codec_context->width, mdecoder->codec_context->height);
54
@@ -400,7 +411,11 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE *data, UI
55
                                    (int16_t *) dst, &frame_size, src, src_size);
56
 #else
57
        {
58
+#if LIBAVCODEC_VERSION_MAJOR < 55
59
            AVFrame *decoded_frame = avcodec_alloc_frame();
60
+#else
61
+           AVFrame *decoded_frame = av_frame_alloc();
62
+#endif
63
            int got_frame = 0;
  • 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.