diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-23 03:00:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-23 03:25:51 +0100 |
commit | d1c28e35300130f0ee28a3e5bbeb2cea403fad57 (patch) | |
tree | a18d0b0989962e2e2cab201fbf6128ae8332d8a4 /libavformat/movenc.c | |
parent | 9f50dafe9025555f11e66e3b09cf3db2cd53cfb2 (diff) | |
parent | 4e8d6218c3cb8b9feffb70f8a53859540b975b36 (diff) | |
download | ffmpeg-d1c28e35300130f0ee28a3e5bbeb2cea403fad57.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
build: fix standalone compilation of OMA muxer
build: fix standalone compilation of Microsoft XMV demuxer
build: fix standalone compilation of Core Audio Format demuxer
kvmc: fix invalid reads
4xm: Add a check in decode_i_frame to prevent buffer overreads
adpcm: fix IMA SMJPEG decoding
options: set minimum for "threads" to zero
bsd: use number of logical CPUs as automatic thread count
windows: use number of CPUs as automatic thread count
linux: use number of CPUs as automatic thread count
pthreads: reset active_thread_type when slice thread_init returrns early
v410dec: include correct headers
Drop ALT_ prefix from BITSTREAM_READER_LE name.
lavfi: always build vsrc_buffer.
ra144enc: zero the reflection coeffs if the filter is unstable
sws: readd PAL8 to isPacked()
mov: Don't stick the QuickTime field ordering atom in extradata.
truespeech: fix invalid reads in truespeech_apply_twopoint_filter()
Conflicts:
configure
libavcodec/4xm.c
libavcodec/avcodec.h
libavfilter/Makefile
libavfilter/allfilters.c
libavformat/Makefile
libswscale/swscale_internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2e8ef90e0e..da22c4e855 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -799,6 +799,23 @@ static int mov_write_uuid_tag_ipod(AVIOContext *pb) return 28; } +static const uint16_t fiel_data[] = { + 0x0000, 0x0100, 0x0201, 0x0206, 0x0209, 0x020e +}; + +static int mov_write_fiel_tag(AVIOContext *pb, MOVTrack *track) +{ + unsigned mov_field_order = 0; + if (track->enc->field_order < FF_ARRAY_ELEMS(fiel_data)) + mov_field_order = fiel_data[track->enc->field_order]; + else + return 0; + avio_wb32(pb, 10); + ffio_wfourcc(pb, "fiel"); + avio_wb16(pb, mov_field_order); + return 10; +} + static int mov_write_subtitle_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); @@ -885,7 +902,9 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) mov_write_avcc_tag(pb, track); if(track->mode == MODE_IPOD) mov_write_uuid_tag_ipod(pb); - } else if(track->vosLen > 0) + } else if (track->enc->field_order != AV_FIELD_UNKNOWN) + mov_write_fiel_tag(pb, track); + else if(track->vosLen > 0) mov_write_glbl_tag(pb, track); if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num && |