Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- fixed: don't rely on ffmpeg's "FF_API_OLD_ENCODE_AUDIO", use

LIBAVCODEC_VERSION instead
  • Loading branch information...
commit 579e3398018ff7549c5a90fb3fc23a1db04a61ea 1 parent bc4c0e6
@ThomasVolkert ThomasVolkert authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 HomerMultimedia/src/MediaSource.cpp
View
16 HomerMultimedia/src/MediaSource.cpp
@@ -246,18 +246,20 @@ void MediaSource::LogSupportedVideoCodecs(bool pSendToLoggerOnly)
{
if (tCodec->type == AVMEDIA_TYPE_VIDEO)
{
- #ifndef FF_API_OLD_ENCODE_AUDIO
- bool tEncode = (tCodec->encode != NULL);
+ bool tDecode = (tCodec->decode != NULL);
+ bool tEncode = false;
+ #if (LIBAVCODEC_VERSION_MAJOR < 55)
+ tEncode = (tCodec->encode != NULL);
#else
- bool tEncode = (tCodec->encode2 != NULL);
+ tEncode = (tCodec->encode2 != NULL);
#endif
- bool tDecode = (tCodec->decode != NULL);
+
if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
{
- #ifndef FF_API_OLD_ENCODE_AUDIO
- tEncode |= (tNextCodec->encode != NULL);
+ #if (LIBAVCODEC_VERSION_MAJOR < 55)
+ tEncode |= (tNextCodec->encode != NULL);
#else
- tEncode |= (tNextCodec->encode2 != NULL);
+ tEncode |= (tNextCodec->encode2 != NULL);
#endif
tDecode |= (tNextCodec->decode != NULL);
tCodec = tNextCodec;
Please sign in to comment.
Something went wrong with that request. Please try again.