Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
1a69168c
Commit
1a69168c
authored
May 21, 2013
by
Yann Diorcet
Browse files
Fix old/new avcodec library detection
parent
d808b43a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
src/utils/ffmpeg-priv.c
src/utils/ffmpeg-priv.c
+4
-0
src/utils/ffmpeg-priv.h
src/utils/ffmpeg-priv.h
+6
-2
No files found.
src/utils/ffmpeg-priv.c
View file @
1a69168c
...
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
...
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "ffmpeg-priv.h"
#include "ffmpeg-priv.h"
#ifdef FF_API_ALLOC_CONTEXT
#if !FF_API_ALLOC_CONTEXT
#if !FF_API_ALLOC_CONTEXT
AVCodecContext
*
avcodec_alloc_context
(
void
)
{
AVCodecContext
*
avcodec_alloc_context
(
void
)
{
return
avcodec_alloc_context3
(
NULL
);
return
avcodec_alloc_context3
(
NULL
);
...
@@ -28,8 +29,11 @@ void avcodec_get_context_defaults(AVCodecContext *s) {
...
@@ -28,8 +29,11 @@ void avcodec_get_context_defaults(AVCodecContext *s) {
avcodec_get_context_defaults3
(
s
,
NULL
);
avcodec_get_context_defaults3
(
s
,
NULL
);
}
}
#endif
#endif
#endif
#ifdef FF_API_AVCODEC_OPEN
#if !FF_API_AVCODEC_OPEN
#if !FF_API_AVCODEC_OPEN
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
)
{
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
)
{
return
avcodec_open2
(
avctx
,
codec
,
NULL
);
return
avcodec_open2
(
avctx
,
codec
,
NULL
);
}
}
#endif
#endif
#endif
src/utils/ffmpeg-priv.h
View file @
1a69168c
...
@@ -69,14 +69,18 @@ static inline int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
...
@@ -69,14 +69,18 @@ static inline int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
return
avcodec_decode_video
(
avctx
,
picture
,
got_picture_ptr
,
avpkt
->
data
,
avpkt
->
size
);
return
avcodec_decode_video
(
avctx
,
picture
,
got_picture_ptr
,
avpkt
->
data
,
avpkt
->
size
);
}
}
#endif
#endif
#if LIBAVCODEC_VERSION_
INT > AV_VERSION_INT(52,25,0
)
#if
(
LIBAVCODEC_VERSION_
MAJOR >= 56
)
#
define CodecID AVCodecID
#
include <libavcodec/old_codec_ids.h>
#endif
#endif
#ifdef FF_API_ALLOC_CONTEXT
#if !FF_API_ALLOC_CONTEXT
#if !FF_API_ALLOC_CONTEXT
AVCodecContext
*
avcodec_alloc_context
(
void
);
AVCodecContext
*
avcodec_alloc_context
(
void
);
void
avcodec_get_context_defaults
(
AVCodecContext
*
s
);
void
avcodec_get_context_defaults
(
AVCodecContext
*
s
);
#endif
#endif
#endif
#ifdef FF_API_AVCODEC_OPEN
#if !FF_API_AVCODEC_OPEN
#if !FF_API_AVCODEC_OPEN
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
);
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
);
#endif
#endif
#endif
#endif
/* FFMPEG_PRIV_H */
#endif
/* FFMPEG_PRIV_H */
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