diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-01-11 12:11:36 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-01-11 12:15:03 +0100 |
commit | a5334d408148f20e0680f65daa3aff837c5f5db5 (patch) | |
tree | 90ef39b498b9490100b006e0636ad078b4e5a410 /libavformat/movenc.c | |
parent | aa6545e1f30e6f0aa7ad7498f524190b978b4e02 (diff) | |
download | ffmpeg-a5334d408148f20e0680f65daa3aff837c5f5db5.tar.gz |
Handle r10k endianess atom DpxE.
Fixes playback and remuxing of r10k_full-range_big-endian.mov.
Reported, analyzed and tested by Olaf Matthes, olaf matthes gmx de
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index bc2d9eff2b..29535cdaeb 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1081,6 +1081,19 @@ static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) return 0; } +static int mov_write_dpxe_tag(AVIOContext *pb, MOVTrack *track) +{ + avio_wb32(pb, 12); + ffio_wfourcc(pb, "DpxE"); + if (track->enc->extradata_size >= 12 && + !memcmp(&track->enc->extradata[4], "DpxE", 4)) { + avio_wb32(pb, track->enc->extradata[11]); + } else { + avio_wb32(pb, 1); + } + return 0; +} + static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag; @@ -1580,6 +1593,9 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) track->enc->codec_id == AV_CODEC_ID_VP6A) { /* Don't write any potential extradata here - the cropping * is signalled via the normal width/height fields. */ + } else if (track->enc->codec_id == AV_CODEC_ID_R10K) { + if (track->enc->codec_tag == MKTAG('R','1','0','k')) + mov_write_dpxe_tag(pb, track); } else if (track->vos_len > 0) mov_write_glbl_tag(pb, track); |