summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
Commit message (Collapse)AuthorAge
* Merge commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6'Hendrik Leppkes2015-10-29
|\ | | | | | | | | | | | | * commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6': avpacket: Deprecate av_dup_packet Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Deprecate av_dup_packetLuca Barbato2015-10-26
| | | | | | | | | | As documented, `av_dup_packet` is broken by design, `av_packet_ref` matches the AVFrame ref-counted API and can be safely used instead.
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* | avfilter,swresample,swscale: use fabs, fabsf instead of FFABSGanesh Ajjanagadde2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is well known that fabs and fabsf are at least as fast and sometimes faster than the FFABS macro, at least on the gcc+glibc combination. For instance, see the reference: http://patchwork.sourceware.org/patch/6735/. This was a patch to glibc in order to remove their usages of a macro. The reason essentially boils down to fabs using the __builtin_fabs of the compiler, while FFABS needs to infer to not use a branch and to simply change the sign bit. Usually the inference works, but sometimes it does not. This may be easily checked by looking at the asm. This also has the added benefit of reducing macro usage, which has problems with side-effects. Note that avcodec is not handled here, as it is huge and most things there are integer arithmetic anyway. Tested with FATE. Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'Hendrik Leppkes2015-09-29
|\| | | | | | | | | | | | | * commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | Merge commit '9ad1e0c12caa440de860bd8f2122beb11d73815c'Hendrik Leppkes2015-09-07
|\| | | | | | | | | | | | | * commit '9ad1e0c12caa440de860bd8f2122beb11d73815c': mux: Make sure that the data is actually written Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * mux: Make sure that the data is actually writtenSean McGovern2015-09-03
| | | | | | | | | | | | | | | | | | | | And forward the error if it is not. Bug-Id: 881 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Remove left-over FF_API_DESTRUCT_PACKET cruftHendrik Leppkes2015-09-05
| |
* | Merge commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8': lavc: Drop deprecated destruct_packet related functions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 10/2012.
* | mux: warn if the encoders bitexact flag is set, but not the muxersAndreas Cadhalpun2015-08-30
| | | | | | | | | | Based-on-patch-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat: Remove use of AVFrac and AVStream->ptsMichael Niedermayer2015-08-23
| | | | | | | | | | | | | | Move field to internal part of AVStream and struct to internal.h Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | add missing FF_API_DESTRUCT_PACKET guardsAndreas Cadhalpun2015-08-22
| | | | | | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/mux: Update sidedata in ff_write_chained()Michael Niedermayer2015-08-20
| | | | | | | | | | | | Fixes Ticket4777 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * mux: Do not leave stale side data pointers in ff_interleave_add_packet()Michael Niedermayer2015-05-06
| | | | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | libavformat/mux: Add ff_choose_chroma_location()Michael Niedermayer2015-05-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: use <0 instead of != 0 for error check of init_muxer()Michael Niedermayer2015-05-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: Add avoid_negative_ts_use_ptsMichael Niedermayer2015-05-05
| | | | | | | | | | | | This allows using pts instead of dts for negative TS avoidance Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: Place timestamp related trace av_logs under FF_FDEBUG_TSMichael Niedermayer2015-04-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'Michael Niedermayer2015-02-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '9deaec782810d098bca11c9332fab2d2f4c5fb78': lavf: move internal fields from public to internal context Conflicts: libavformat/avformat.h libavformat/internal.h libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: move internal fields from public to internal contextwm42015-02-10
| | | | | | | | | | | | | | This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * libavformat: Allow calling av_write_trailer with a NULL AVIOContextMartin Storsjö2014-12-19
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/mux: remove unneeded #include, there are no assert() only av_assert*Paul B Mahol2015-01-31
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/mux: 2 subtitle packets could have the same DTSMichael Niedermayer2014-12-29
| | | | | | | | | | | | | | | | | | | | | | | | Fixes Ticket3514 See: ETSI EN 300 743 V1.3.1 (2006-11) "In summary, all of the segments of a single display set shall be carried in one (or more) PES packets that have the same PTS value." with PTS = DTS and remuxing of such a stream it is to be expected that sometimes multiple packets would have the same DTS Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mux: Always call write_trailer() from av_write_trailer() to avoid a leak.Carl Eugen Hoyos2014-11-20
| | | | | | | | Fixes ticket #4049.
* | Merge commit '9257692ac15eff7b07540c1f61cebde0d8823fbd'Michael Niedermayer2014-11-18
|\| | | | | | | | | | | | | | | | | | | * commit '9257692ac15eff7b07540c1f61cebde0d8823fbd': lavf: Only initialize s->offset once when using avoid_negative_ts make_zero Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Only initialize s->offset once when using avoid_negative_ts make_zeroMartin Storsjö2014-11-17
| | | | | | | | | | | | | | | | | | | | When given a stream starting at dts=0, it would previously consider s->offset as uninitialized and set an offset when the second packet was written, ending up writing two packets with dts=0. By initializing this field to AV_NOPTS_VALUE, we make sure that we only initialize it once, on the first packet. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '897d5c3a4296f3da80b8699d1487328ca2de8e55'Michael Niedermayer2014-11-07
|\| | | | | | | | | | | | | | | | | | | | | * commit '897d5c3a4296f3da80b8699d1487328ca2de8e55': lavf: Print a warning if failed to avoid negative timestamps when requested Conflicts: libavformat/mux.c See: ec6a5fc6cca22e4eb0a91cc8fba786d41ade2032 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Print a warning if failed to avoid negative timestamps when requestedMichael Niedermayer2014-11-07
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1384df641994bf3d6cb51084290aa94752737bae'Michael Niedermayer2014-11-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1384df641994bf3d6cb51084290aa94752737bae': lavf: Add an option for avoiding negative timestamps Conflicts: libavformat/avformat.h libavformat/mux.c libavformat/options_table.h libavformat/version.h See: 3ba0dab76ac32f0c9f50c916a73bc64e43c1fdf9 See: a89c01253190b9eb9de8e28a3252423bf7732511 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Add an option for avoiding negative timestampsMichael Niedermayer2014-11-07
| | | | | | | | | | | | | | | | | | | | | | This is the same logic as is invoked on AVFMT_TS_NEGATIVE, but which can be enabled manually, or can be enabled in muxers which only need it in certain conditions. Also allow using the same mechanism to force streams to start at 0. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '91e8d2eb1f7bf3af949008b106ec1ca037b88b0e'Michael Niedermayer2014-11-06
|\| | | | | | | | | | | | | | | | | | | * commit '91e8d2eb1f7bf3af949008b106ec1ca037b88b0e': lavf: use the format context strict_std_compliance instead of the codec one Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use the format context strict_std_compliance instead of the codec oneAnton Khirnov2014-11-06
| |
* | avformat/mux: Fix assertion failure due to max_interleave_delta and poor inputMichael Niedermayer2014-10-22
| | | | | | | | | | | | Fixes Ticket4051 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d6e58497e76836604364b037df9b00ba3d75b69'Michael Niedermayer2014-10-15
|\| | | | | | | | | | | | | | | | | | | * commit '2d6e58497e76836604364b037df9b00ba3d75b69': lavf: switch to AVCodecContext.framerate for demuxing Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: switch to AVCodecContext.framerate for demuxingAnton Khirnov2014-10-15
| |
* | Merge commit 'eb4f9069002e73648f6640cd054fc814cfda75b8'Michael Niedermayer2014-10-10
|\| | | | | | | | | | | | | | | | | | | | | * commit 'eb4f9069002e73648f6640cd054fc814cfda75b8': lavf: More informative error message Conflicts: libavformat/mux.c See: 30ced7e69f434bd49b39fb7c8ce02d9ba71babfc Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: More informative error messageLuca Barbato2014-10-10
| | | | | | | | Print the timestamp values and not just the stream index.
* | avformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruftJames Almer2014-10-05
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf: eliminate ff_get_audio_frame_size()Anton Khirnov2014-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is basically a wrapper around av_get_audio_frame_duration(), with a fallback to AVCodecContext.frame_size. However, that field is set only when the stream codec context is actually used for encoding or decoding, which is discouraged. For muxing, it is generally the responsibility of the caller to set the packet duration. For demuxing, if the duration is not stored at the container level, it should be set by the parser. Therefore, removing the frame_size fallback should not break any important case. (cherry picked from commit 30e50c50274f88f0f5ae829f401cd3c7f5266719) Conflicts: libavformat/utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: flush after header writing, like after packetsMichael Niedermayer2014-08-03
| | | | | | | | | | | | | | This makes problematic unconditional flushes in mpegts redundant And is thus part of a fix for ticket 2748 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mux: Fix a typo checking aspect ratios.Carl Eugen Hoyos2014-07-30
| | | | | | | | Fixes ticket #3813.
* | avformat/mux: ignore delayed vp8/9 packets in max_interleave_delta calculationMichael Niedermayer2014-07-26
| | | | | | | | | | | | | | | | | | libvpx adds very significant delay, which appears normal and we must buffer all other streams no matter what to interleave them correctly Fixes Ticket3440 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: support re-interleaving packets in ff_write_chained()Michael Niedermayer2014-07-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: keep AVPacket fields consistent in ff_write_chained()Michael Niedermayer2014-07-24
| | | | | | | | | | | | | | This might have caused double frees in theory, i do not have a test case though Signed-off-by: Michael Niedermayer <michaelni@gmx.at>