diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-01 17:13:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-01 17:13:05 +0200 |
commit | 7426acff1aed209bc7db4c87697a5931e177eaf1 (patch) | |
tree | e61531c6a0f689f94d98ffeb7fca8e921bb390e5 /libavformat | |
parent | e77b9853ea66ef6c34b04d121c5b3d1afaa33971 (diff) | |
parent | 18f2514c4037befd37b02e4d4f10c159edf3b26f (diff) | |
download | ffmpeg-7426acff1aed209bc7db4c87697a5931e177eaf1.tar.gz |
Merge commit '18f2514c4037befd37b02e4d4f10c159edf3b26f'
* commit '18f2514c4037befd37b02e4d4f10c159edf3b26f':
mov: export stsd Compressorname in metadata
Conflicts:
libavformat/mov.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index ed0d93de90..ff85a1ffec 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1208,6 +1208,7 @@ static int mov_codec_id(AVStream *st, uint32_t format) static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc) { + uint8_t codec_name[32]; unsigned int color_depth, len, j; int color_greyscale; int color_table_id; @@ -1229,18 +1230,22 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, len = avio_r8(pb); /* codec name, pascal string */ if (len > 31) len = 31; - mov_read_mac_string(c, pb, len, st->codec->codec_name, 32); + mov_read_mac_string(c, pb, len, codec_name, sizeof(codec_name)); if (len < 31) avio_skip(pb, 31 - len); + + if (codec_name[0]) + av_dict_set(&st->metadata, "encoder", codec_name, 0); + /* codec_tag YV12 triggers an UV swap in rawdec.c */ - if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { + if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) { st->codec->codec_tag = MKTAG('I', '4', '2', '0'); st->codec->width &= ~1; st->codec->height &= ~1; } /* Flash Media Server uses tag H263 with Sorenson Spark */ if (st->codec->codec_tag == MKTAG('H','2','6','3') && - !memcmp(st->codec->codec_name, "Sorenson H263", 13)) + !memcmp(codec_name, "Sorenson H263", 13)) st->codec->codec_id = AV_CODEC_ID_FLV1; st->codec->bits_per_coded_sample = avio_rb16(pb); /* depth */ |