aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-18 22:27:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-18 22:29:27 +0200
commit5771efde87c17e1ecda4db32437d16d108c61be2 (patch)
treeb4600c7b2ab783c78159e015bf1643fbbcf9436d /libavformat/movenc.c
parentbbee02ed9c186c1bb1fc0c3bcf79e78af978ae6a (diff)
parent0ba5299a805e9ccaef1a757381fc2ada4d54b8a1 (diff)
downloadffmpeg-5771efde87c17e1ecda4db32437d16d108c61be2.tar.gz
Merge commit '0ba5299a805e9ccaef1a757381fc2ada4d54b8a1'
* commit '0ba5299a805e9ccaef1a757381fc2ada4d54b8a1': movenc: use the "encoder" metadata tag to write stsd Compressorname Conflicts: libavformat/movenc.c libavformat/movenc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index adcbcf2c0f..12111cb86e 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1184,12 +1184,14 @@ static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
static void find_compressor(char * compressor_name, int len, MOVTrack *track)
{
+ AVDictionaryEntry *encoder;
int xdcam_res = (track->enc->width == 1280 && track->enc->height == 720)
|| (track->enc->width == 1440 && track->enc->height == 1080)
|| (track->enc->width == 1920 && track->enc->height == 1080);
- if (track->mode == MODE_MOV && track->enc->codec && track->enc->codec->name) {
- av_strlcpy(compressor_name, track->enc->codec->name, 32);
+ if (track->mode == MODE_MOV &&
+ (encoder = av_dict_get(track->st->metadata, "encoder", NULL, 0))) {
+ av_strlcpy(compressor_name, encoder->value, 32);
} else if (track->enc->codec_id == AV_CODEC_ID_MPEG2VIDEO && xdcam_res) {
int interlaced = track->enc->field_order > AV_FIELD_PROGRESSIVE;
AVStream *st = track->st;
@@ -3984,8 +3986,8 @@ static int mov_write_header(AVFormatContext *s)
MOVTrack *track= &mov->tracks[i];
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);
+ track->st = st;
track->enc = st->codec;
- track->st = st;
track->language = ff_mov_iso639_to_lang(lang?lang->value:"und", mov->mode!=MODE_MOV);
if (track->language < 0)
track->language = 0;