[SM-Commit] GIT changes to master grimoire by Florian Franzmann (7764d41e7e98faa6318771212270f9ade75288e9)

Florian Franzmann scm at sourcemage.org
Thu Mar 1 14:18:44 EST 2012


GIT changes to master grimoire by Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>:

 audio-players/moc/HISTORY         |    3 +++
 audio-players/moc/PRE_BUILD       |    5 +++++
 audio-players/moc/ffmpeg-10.patch |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)

New commits:
commit 7764d41e7e98faa6318771212270f9ade75288e9
Author: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>

    audio-players/moc: fixed build error with ffmpeg 10

diff --git a/audio-players/moc/HISTORY b/audio-players/moc/HISTORY
index df4999e..ece0c87 100644
--- a/audio-players/moc/HISTORY
+++ b/audio-players/moc/HISTORY
@@ -1,3 +1,6 @@
+2012-03-01 Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
+	* PRE_BUILD, ffmpeg-10.patch: fixed build error with ffmpeg 10
+
 2010-02-24 Sukneet <skipinder at gmail.com>
 	* DETAILS: updated DEV to 2.5.0-alpha4; bug #15601
 
diff --git a/audio-players/moc/PRE_BUILD b/audio-players/moc/PRE_BUILD
new file mode 100755
index 0000000..6f62cdf
--- /dev/null
+++ b/audio-players/moc/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+if [[ "$DEV" == "y" ]]; then
+  patch -p2 < ${SCRIPT_DIRECTORY}/ffmpeg-10.patch
+fi
diff --git a/audio-players/moc/ffmpeg-10.patch b/audio-players/moc/ffmpeg-10.patch
new file mode 100644
index 0000000..c18841d
--- /dev/null
+++ b/audio-players/moc/ffmpeg-10.patch
@@ -0,0 +1,34 @@
+--- a/moc/decoder_plugins/ffmpeg/ffmpeg.c
++++ b/moc/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -86,14 +86,14 @@ static void ffmpeg_info (const char *file_name,
+ 	}
+ 
+ 	if (tags_sel & TAGS_COMMENTS) {
+-		if (ic->track != 0)
+-			info->track = ic->track;
+-		if (ic->title[0] != 0)
+-			info->title = xstrdup (ic->title);
+-		if (ic->author[0] != 0)
+-			info->artist = xstrdup (ic->author);
+-		if (ic->album[0] != 0)
+-			info->album = xstrdup (ic->album);
++		if (av_metadata_get(ic->metadata, "track", NULL, 0) != NULL)
++			info->track = atoi(av_metadata_get(ic->metadata, "track", NULL, 0)->value);
++		if (av_metadata_get(ic->metadata, "title", NULL, 0) != NULL)
++			info->title = xstrdup (av_metadata_get(ic->metadata, "titke", NULL, 0)->value);
++		if (av_metadata_get(ic->metadata, "author", NULL, 0) != NULL)
++			info->artist = xstrdup (av_metadata_get(ic->metadata, "author", NULL, 0)->value);
++		if (av_metadata_get(ic->metadata, "album", NULL, 0) != NULL)
++			info->album = xstrdup (av_metadata_get(ic->metadata, "album", NULL, 0)->value);
+ 	}
+ 
+ 	if (tags_sel & TAGS_TIME)
+@@ -132,7 +132,7 @@ static void *ffmpeg_open (const char *file)
+ 	av_read_play (data->ic);
+ 	for (i = 0; i < data->ic->nb_streams; i++) {
+ 		data->enc = data->ic->streams[i]->codec;
+-		if (data->enc->codec_type == CODEC_TYPE_AUDIO) {
++		if (data->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
+ 			audio_index = i;
+ 			break;
+ 		}


More information about the SM-Commit mailing list