Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
6dcca2b9
Commit
6dcca2b9
authored
Mar 14, 2019
by
Adrien Béraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rotation: fix build with ffmpeg < 4.0
Change-Id: I975fb3844b135c7eb15357558e52f9bbfee13237
parent
fb6dbb06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
src/media/libav_deps.h
src/media/libav_deps.h
+5
-0
src/media/libav_utils.cpp
src/media/libav_utils.cpp
+16
-0
No files found.
src/media/libav_deps.h
View file @
6dcca2b9
...
...
@@ -39,6 +39,11 @@ extern "C" {
#include <libavutil/intreadwrite.h>
#include <libavutil/log.h>
#include <libavutil/samplefmt.h>
#if LIBAVUTIL_VERSION_MAJOR < 56
AVFrameSideData
*
av_frame_new_side_data_from_buf
(
AVFrame
*
frame
,
enum
AVFrameSideDataType
type
,
AVBufferRef
*
buf
);
#endif
}
#include "libav_utils.h"
...
...
src/media/libav_utils.cpp
View file @
6dcca2b9
...
...
@@ -23,7 +23,9 @@
#include "libav_deps.h" // MUST BE INCLUDED FIRST
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "video/video_base.h"
#include "logger.h"
...
...
@@ -36,6 +38,20 @@
#include <exception>
#include <ciso646> // fix windows compiler bug
extern
"C"
{
#if LIBAVUTIL_VERSION_MAJOR < 56
AVFrameSideData
*
av_frame_new_side_data_from_buf
(
AVFrame
*
frame
,
enum
AVFrameSideDataType
type
,
AVBufferRef
*
buf
)
{
auto
side_data
=
av_frame_new_side_data
(
frame
,
type
,
0
);
av_buffer_unref
(
&
side_data
->
buf
);
side_data
->
buf
=
buf
;
side_data
->
data
=
side_data
->
buf
->
data
;
side_data
->
size
=
side_data
->
buf
->
size
;
}
#endif
}
namespace
ring
{
namespace
libav_utils
{
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment