[FFmpeg-cvslog] mmf.c: Use LIBAVFORMAT_IDENT when writing Yamaha SMAF version information.

Carl Eugen Hoyos git at videolan.org
Sat Jan 5 23:41:03 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Jan  5 23:39:46 2013 +0100| [1a34103f0f22a85c593baa5905be6a4bef9b975a] | committer: Carl Eugen Hoyos

mmf.c: Use LIBAVFORMAT_IDENT when writing Yamaha SMAF version information.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a34103f0f22a85c593baa5905be6a4bef9b975a
---

 libavformat/mmf.c     |    5 ++++-
 libavformat/version.h |    2 +-
 tests/ref/lavf/mmf    |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index a63d8cb..cb2ab0b 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -68,6 +68,9 @@ static int mmf_write_header(AVFormatContext *s)
     AVIOContext *pb = s->pb;
     int64_t pos;
     int rate;
+    const char *version = s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT ?
+                          "VN:Lavf," :
+                          "VN:"LIBAVFORMAT_IDENT",";
 
     rate = mmf_rate_code(s->streams[0]->codec->sample_rate);
     if(rate < 0) {
@@ -85,7 +88,7 @@ static int mmf_write_header(AVFormatContext *s)
     avio_w8(pb, 0); /* counts */
     end_tag_be(pb, pos);
     pos = ff_start_tag(pb, "OPDA");
-    avio_write(pb, "VN:libavcodec,", sizeof("VN:libavcodec,") -1); /* metadata ("ST:songtitle,VN:version,...") */
+    avio_write(pb, version, strlen(version)); /* metadata ("ST:songtitle,VN:version,...") */
     end_tag_be(pb, pos);
 
     avio_write(pb, "ATR\x00", 4);
diff --git a/libavformat/version.h b/libavformat/version.h
index d75f9c9..f6901dd 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR 54
 #define LIBAVFORMAT_VERSION_MINOR 59
-#define LIBAVFORMAT_VERSION_MICRO 104
+#define LIBAVFORMAT_VERSION_MICRO 105
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \
diff --git a/tests/ref/lavf/mmf b/tests/ref/lavf/mmf
index e94d3a2..fea8015 100644
--- a/tests/ref/lavf/mmf
+++ b/tests/ref/lavf/mmf
@@ -1,3 +1,3 @@
-786815c553a0bd2cb066f27a911f1b1f *./tests/data/lavf/lavf.mmf
-22617 ./tests/data/lavf/lavf.mmf
+b165af6f2e5c6c1de733e9d3848bcebb *./tests/data/lavf/lavf.mmf
+22611 ./tests/data/lavf/lavf.mmf
 ./tests/data/lavf/lavf.mmf CRC=0x03633476



More information about the ffmpeg-cvslog mailing list