aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * movenc: Rename reserved_moov_pos to reserved_header_posMartin Storsjö2015-08-101-7/+7
| | | | | | | | | | | | | | The same field is also used for writing the sidx index header, for fragmented files, when the faststart flag is used. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8e34089e265a6b01e1e3301e8864439d26793753'Hendrik Leppkes2015-08-101-0/+2
|\| | | | | | | | | | | | | * commit '8e34089e265a6b01e1e3301e8864439d26793753': movenc: Check that frag_info entries exist in mov_write_sidx_tag Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * movenc: Check that frag_info entries exist in mov_write_sidx_tagMartin Storsjö2015-08-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes crashes with pathological cases when trying to write a sidx index (via the -movflags faststart option, in combination with fragmenting options), when no fragments actually have been written. (This is possible if the empty_moov flag isn't used, so that all actual packet data is written in the moov/mdat pair, and no moof/mdat pairs have been written.) In these pathological cases, no sidx should be written at all. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avformat/movenc: Drop redundant bit exact field from contextMichael Niedermayer2015-07-181-6/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: fix mime-types in movenc.ccompn2015-07-091-3/+3
| | | | | | | | | | | | | | | | | | | | https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html says video/mp4 suggested by BBB on irc. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e95c7a61852cc5b9ce5445ff034b87553e61958a'Michael Niedermayer2015-06-301-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e95c7a61852cc5b9ce5445ff034b87553e61958a': mov: Preserve the metadata even when bit-exactness is requested Conflicts: libavformat/movenc.c tests/ref/vsynth/vsynth1-mpeg4 tests/ref/vsynth/vsynth2-mpeg4 See: a17ee4117dcb2922f57da33b8401d11b06e81cba Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Preserve the metadata even when bit-exactness is requestedLuca Barbato2015-06-301-7/+7
| | | | | | | | | | | | | | Make sure to not write the custom `encoder` string in that case. Bug-Id: 845 CC: libav-stable@libav.org
| * movenc: fixes a questionable valgrind uninitialized value warningJanne Grunau2015-06-101-1/+1
| | | | | | | | | | | | | | display_matrix_size is only initialized when av_stream_get_side_data() returns a side data pointer. The code is safe since the only effect this has is setting the display_matrix pointer to NULL which it was already anyway.
* | avformat/movenc: Check return code of ff_iso8601_to_unix_time()Michael Niedermayer2015-06-211-1/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Make static packed_size, const staticMichael Niedermayer2015-06-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Fix potential signed overflowsMichael Niedermayer2015-06-011-2/+2
| | | | | | | | | | | | Fixes CID1302838 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Add loction/xyz support to allow copying data between mov filesMichael Niedermayer2015-05-301-0/+1
| | | | | | | | | | | | Fixes Ticket4337 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Check that track_width_1616 fits within the available 32bit ↵Michael Niedermayer2015-05-291-1/+3
| | | | | | | | | | | | before storing it Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: avoid floats in width/height/aspect ratio computationsMichael Niedermayer2015-05-291-4/+6
| | | | | | | | | | | | This avoids the possibility for rounding/precision differences between platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Allow muxing mp3 with samplerate < 16khz if the user sets ↵Michael Niedermayer2015-05-271-4/+9
| | | | | | | | | | | | | | | | | | strict to -1 Fixes Ticket4267 Approved-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Avoid floats & float rounding in tmcd nb_frames calculationMichael Niedermayer2015-05-261-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenc: Remove float use from rgb_to_yuv()Michael Niedermayer2015-05-241-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mov: Use AVCOL_SPC constants when checking color_space.Carl Eugen Hoyos2015-05-211-3/+3
| | | | | | | | Suggested-by: Ronald Bultje
* | lavf/mov: Write colour matrix "6" for color_space bt470bg.Carl Eugen Hoyos2015-05-211-0/+1
| | | | | | | | This matches the demuxer's behaviour.
* | Merge commit 'e0046bc9c96150fa06146ace9093f06857dd7b23'Michael Niedermayer2015-03-231-0/+2
|\| | | | | | | | | | | | | | | | | | | * commit 'e0046bc9c96150fa06146ace9093f06857dd7b23': movenc: Write the make and model metadata keys for mov style files Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write the make and model metadata keys for mov style filesMartin Storsjö2015-03-231-0/+2
| | | | | | | | | | | | | | These are essential allowing QuickTime to keep detecting content as slow-motion - this allows preserving them on stream copy. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/movenc: avoid using uninitialized display_matrix_sizeMichael Niedermayer2015-03-211-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cf18e777aed9f73011c7ab7cbab8003189d4b9d8'Michael Niedermayer2015-03-201-1/+11
|\| | | | | | | | | | | | | | | | | | | * commit 'cf18e777aed9f73011c7ab7cbab8003189d4b9d8': movenc: write the display transform matrix Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: write the display transform matrixAnton Khirnov2015-03-191-9/+21
| |
* | Merge commit '67a2912307c3c08f2725ccae162cfe3426b80184'Michael Niedermayer2015-03-191-9/+24
|\| | | | | | | | | | | | | * commit '67a2912307c3c08f2725ccae162cfe3426b80184': movenc: Don't assume that fragment durations in pts is equal to duration in dts Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't assume that fragment durations in pts is equal to duration in dtsMartin Storsjö2015-03-191-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | For strict CFR, they should be pretty much equal, but if the stream is VFR, there can be a sometimes significant difference. Calculate the pts duration separately, used in sidx atoms and for tfrf/tfxd boxes in smooth streaming ismv files. Also make sure to reduce the duration of sidx entries according to edit lists. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '5c337353a2546416631a87de4881850d99141c39'Michael Niedermayer2015-03-191-4/+4
|\| | | | | | | | | | | | | * commit '5c337353a2546416631a87de4881850d99141c39': movenc: Move sidx edit list timestamp adjustment into a block Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Move sidx edit list timestamp adjustment into a blockMartin Storsjö2015-03-191-4/+4
| | | | | | | | | | | | | | When reading these values from track->frag_info, the same adjustment has already been done. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'eee13d653953083553cceadbbedf6222ef78a006'Michael Niedermayer2015-03-191-2/+4
|\| | | | | | | | | | | | | * commit 'eee13d653953083553cceadbbedf6222ef78a006': movenc: Only adjust the cts offset at the start of fragments if necessary Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Only adjust the cts offset at the start of fragments if necessaryMartin Storsjö2015-03-191-2/+4
| | | | | | | | | | | | | | | | | | Adjusting it is only necessary when a sidx/tfrf/tfxd atom already has been written for the previous fragment (since the sidx/tfrf/tfxd atoms include the duration between the first pts of the previous fragment, to the first pts of the new fragment). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '5cf892d6946b19a87bcd00d6b76ce81f45960fdb'Michael Niedermayer2015-03-191-1/+2
|\| | | | | | | | | | | | | * commit '5cf892d6946b19a87bcd00d6b76ce81f45960fdb': movenc: Write pts timestamps in tfxd, instead of dts timestamps Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Write pts timestamps in tfxd, instead of dts timestampsMartin Storsjö2015-03-191-1/+2
| | | | | | | | | | | | This matches what we write in tfra and tfrf since 9cbf70fa0e. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b81b0cc22b22413760423e239ea644c9afdbfa2d'Michael Niedermayer2015-03-191-1/+7
|\| | | | | | | | | | | | | * commit 'b81b0cc22b22413760423e239ea644c9afdbfa2d': movenc: Set the last packet duration based on the next packet when autoflushing Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Set the last packet duration based on the next packet when autoflushingMartin Storsjö2015-03-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When automatically flushing fragments based on set conditions (fragmentation on keyframes, after some interval or byte size), we already have the next packet for one stream - use this for setting the duration of the last packet in the flushed fragment correctly. This avoids having to adjust the timestamp of the first packet in the new fragment since the last duration was unknown. Unfortunately, this only works for automatic flushing (not for caller-triggered flushing, like in the dash muxer), and only for the one single track that triggered the flushing. The duration of the last sample in all other tracks still is dependent on AVPacket duration (or heuristics). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2889c5e16711770437f380f1bead5f72c6a0b17a'Michael Niedermayer2015-03-191-0/+26
|\| | | | | | | | | | | | | * commit '2889c5e16711770437f380f1bead5f72c6a0b17a': movenc: Heuristically set the duration of the last sample in a fragment if not set Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Heuristically set the duration of the last sample in a fragment if ↵Martin Storsjö2015-03-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not set Even if this is a guess, it is way better than writing a zero duration of the last sample in a fragment (because if the duration is zero, the first sample of the next fragment will have the same timestamp as the last sample in the previous one). Since we normally don't require libavformat muxer users to set the duration field in AVPacket, we probably can't strictly require it here either, so don't log this as a strict warning, only as info. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2cb9c2fc59c9267ad2631c07c81c188058502259'Michael Niedermayer2015-03-161-7/+78
|\| | | | | | | | | | | | | | | | | | | | | * commit '2cb9c2fc59c9267ad2631c07c81c188058502259': movenc: Allow interleaving samples when writing fragmented files Conflicts: libavformat/movenc.c libavformat/movenc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Allow interleaving samples when writing fragmented filesMartin Storsjö2015-03-161-7/+78
| | | | | | | | | | | | | | | | | | | | | | This is incompatible with the omit_tfhd_offset flag (writing position independent fragments with interleaving requires the default_base_moof flag). This makes the moof atoms slightly bigger, but can be better for playback (improving locality of sample data in the mdat). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '50ff0c05b691524d1fd044a2f2eefb706932fc98'Michael Niedermayer2015-03-161-8/+16
|\| | | | | | | | | | | | | * commit '50ff0c05b691524d1fd044a2f2eefb706932fc98': movenc: Support writing multiple trun atoms Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Support writing multiple trun atomsMartin Storsjö2015-03-161-8/+16
| | | | | | | | | | | | | | | | | | This is needed if all the data for one track isn't continuous within the mdat. Normally we make sure all the data for one track is continuous, but in new cases we will need to have the samples interleaved. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '448c8cfe4c53e9e806effd8505b46d57fa707061'Michael Niedermayer2015-03-101-8/+9
|\| | | | | | | | | | | | | | | | | | | * commit '448c8cfe4c53e9e806effd8505b46d57fa707061': movenc: Support setting fragment_index before the moov atom is written Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Support setting fragment_index before the moov atom is writtenMartin Storsjö2015-03-101-8/+9
| | | | | | | | | | | | | | | | | | | | This way, the caller doesn't need to coordinate setting the option after the moov atom has been written. The downside is that it is no longer possible to use the option for checking whether the moov atom already has been written, but a caller is able to keep track of that by other means anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '0c5e380c2c266d2e8a13c000cc527529db837f10'Michael Niedermayer2015-03-101-4/+7
|\| | | | | | | | | | | | | * commit '0c5e380c2c266d2e8a13c000cc527529db837f10': movenc: Don't rely on the fragment index for vc1 info gathering Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Don't rely on the fragment index for vc1 info gatheringMartin Storsjö2015-03-101-4/+7
| | | | | | | | | | | | | | | | The previous use of the mov->fragments field, for determining whether written packets were part of the first fragment or not, didn't work as intended when using the empty_moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '46d4d8575979a24a8d026d9805039b724e0e3e5f'Michael Niedermayer2015-03-091-1/+2
|\| | | | | | | | | | | | | * commit '46d4d8575979a24a8d026d9805039b724e0e3e5f': movenc: Avoid writing separate flags for the first sample if not necessary Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Avoid writing separate flags for the first sample if not necessaryMartin Storsjö2015-03-091-1/+2
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '00d751d4fc20ec88d2cc2c9f39ec8b9e9c8cdeba'Michael Niedermayer2015-03-091-10/+15
|\| | | | | | | | | | | | | * commit '00d751d4fc20ec88d2cc2c9f39ec8b9e9c8cdeba': movenc: Set tfhd default sample flags based on actual samples, if possible Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Set tfhd default sample flags based on actual samples, if possibleMartin Storsjö2015-03-091-10/+15
| | | | | | | | | | | | | | | | | | | | This avoids assuming that e.g. audio samples are marked as sync samples. This allows omitting the sample flags from trun, if the default flags happen to be right for all the samples. Signed-off-by: Martin Storsjö <martin@martin.st>