You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
mmf.c: Use LIBAVFORMAT_IDENT when writing Yamaha SMAF version information.
This commit is contained in:
@@ -68,6 +68,9 @@ static int mmf_write_header(AVFormatContext *s)
|
|||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb = s->pb;
|
||||||
int64_t pos;
|
int64_t pos;
|
||||||
int rate;
|
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);
|
rate = mmf_rate_code(s->streams[0]->codec->sample_rate);
|
||||||
if(rate < 0) {
|
if(rate < 0) {
|
||||||
@@ -85,7 +88,7 @@ static int mmf_write_header(AVFormatContext *s)
|
|||||||
avio_w8(pb, 0); /* counts */
|
avio_w8(pb, 0); /* counts */
|
||||||
end_tag_be(pb, pos);
|
end_tag_be(pb, pos);
|
||||||
pos = ff_start_tag(pb, "OPDA");
|
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);
|
end_tag_be(pb, pos);
|
||||||
|
|
||||||
avio_write(pb, "ATR\x00", 4);
|
avio_write(pb, "ATR\x00", 4);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#define LIBAVFORMAT_VERSION_MAJOR 54
|
#define LIBAVFORMAT_VERSION_MAJOR 54
|
||||||
#define LIBAVFORMAT_VERSION_MINOR 59
|
#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, \
|
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||||
LIBAVFORMAT_VERSION_MINOR, \
|
LIBAVFORMAT_VERSION_MINOR, \
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
786815c553a0bd2cb066f27a911f1b1f *./tests/data/lavf/lavf.mmf
|
b165af6f2e5c6c1de733e9d3848bcebb *./tests/data/lavf/lavf.mmf
|
||||||
22617 ./tests/data/lavf/lavf.mmf
|
22611 ./tests/data/lavf/lavf.mmf
|
||||||
./tests/data/lavf/lavf.mmf CRC=0x03633476
|
./tests/data/lavf/lavf.mmf CRC=0x03633476
|
||||||
|
|||||||
Reference in New Issue
Block a user