Skip to content

Instantly share code, notes, and snippets.

@oyvindio
Created August 23, 2011 18:36
Show Gist options
  • Save oyvindio/1166091 to your computer and use it in GitHub Desktop.
Save oyvindio/1166091 to your computer and use it in GitHub Desktop.
Patch for libdlna to fix some missing symbols from newer libavformat versions. Source: http://code.google.com/p/ffmpegthumbnailer/issues/detail?id=84
--- a/src/profiles.c.orig 2011-08-23 20:26:34.000000000 +0200
+++ b/src/profiles.c 2011-08-23 20:35:03.000000000 +0200
@@ -204,14 +204,24 @@
for (i = 0; i < ctx->nb_streams; i++)
{
+#if LIBAVFORMAT_BUILD < 4621
if (audio_stream == -1 &&
ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
+#else
+ if (audio_stream == -1 &&
+ ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+#endif
{
audio_stream = i;
continue;
}
+#if LIBAVFORMAT_BUILD < 4621
else if (video_stream == -1 &&
ctx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
+#else
+ else if (video_stream == -1 &&
+ ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+#endif
{
video_stream = i;
continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment