Porting to libav v11
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Wed, 26 Nov 2014 15:16:07 +0000 (16:16 +0100)
committerLeandro Dorileo <leandro.maciel.dorileo@intel.com>
Tue, 20 Jan 2015 19:07:42 +0000 (17:07 -0200)
Change-Id: I6047f44dd46843160a2259e56fc937dd407f7b07
Bug-Tizen: TC-2106/related
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
packaging/lightmediascanner.spec
src/plugins/generic/generic.c

index 7b2d6cf..191fffa 100644 (file)
@@ -44,7 +44,7 @@ LMS test programs
 
 %autogen
 
-make %{?_smp_mflags}
+make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
@@ -65,7 +65,6 @@ libtool --mode=install install -m 0755 %{testbindir}/src/bin/list-parsers %{buil
 %defattr(-, root, root)
 %doc AUTHORS README
 %license COPYING
-%{_bindir}/lightmediascanner*
 %{_libdir}/*.so.*
 %{_libdir}/lightmediascanner/plugins/*
 %{_prefix}/share/dbus-1/services/*.service
@@ -78,5 +77,4 @@ libtool --mode=install install -m 0755 %{testbindir}/src/bin/list-parsers %{buil
 
 %files test
 %defattr(-, root, root)
-%{_bindir}/lms-test
-%{_bindir}/lms-list-parsers
+%{_bindir}/*
index 9c76d7a..74c2240 100644 (file)
@@ -86,7 +86,7 @@ struct codec_container_descriptor {
 };
 
 static const struct codec_container_descriptor _codec_list[] = {
-    {CODEC_ID_MP3, &_codec_mpeg1layer3},
+    {AV_CODEC_ID_MP3, &_codec_mpeg1layer3},
     {AV_CODEC_ID_WMAV1, &_codec_audio_asf},
     {AV_CODEC_ID_WMAV2, &_codec_audio_asf},
     {AV_CODEC_ID_WMAPRO, &_codec_audio_asf},
@@ -251,7 +251,7 @@ _get_common_container(AVStream *stream, struct lms_string_size *value)
 
 static const struct codec_container _codecs[] = {
     {
-        .id = CODEC_ID_MP3,
+        .id = AV_CODEC_ID_MP3,
         .get_codec = _get_common_codec,
         .get_container = NULL,
     },
@@ -435,8 +435,8 @@ _parse_video_stream(AVFormatContext *fmt_ctx, struct lms_video_info *info, AVStr
     s->video.width = ctx->width;
     s->video.height = ctx->height;
 
-    if (stream->r_frame_rate.den)
-        s->video.framerate = stream->r_frame_rate.num / stream->r_frame_rate.den;
+    if (stream->avg_frame_rate.den)
+        s->video.framerate = stream->avg_frame_rate.num / stream->avg_frame_rate.den;
 
     snprintf(aspect_ratio, sizeof(aspect_ratio), "%d:%d",
              ctx->sample_aspect_ratio.num, ctx->sample_aspect_ratio.den);