summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
Commit message (Collapse)AuthorAge
* 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>
* | Merge commit '324ff59444ff5470bb325ff1e2be7c4b054fc944'Michael Niedermayer2014-07-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '324ff59444ff5470bb325ff1e2be7c4b054fc944': avpacket: Check for and return errors in ff_interleave_add_packet() Conflicts: libavformat/audiointerleave.c libavformat/internal.h libavformat/mux.c See: 4d7c71c36467331f1e0c0f17af9f371d33308a9c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: Check for and return errors in ff_interleave_add_packet()Nidhi Makhijani2014-07-17
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/mux: fix flush_packets flag with flushing buffersMichael Niedermayer2014-06-28
| | | | | | | | | | Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: simplify ff_choose_timebase()Michael Niedermayer2014-06-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '194be1f43ea391eb986732707435176e579265aa'Michael Niedermayer2014-06-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '194be1f43ea391eb986732707435176e579265aa': lavf: switch to AVStream.time_base as the hint for the muxer timebase Conflicts: doc/APIchanges libavformat/filmstripenc.c libavformat/movenc.c libavformat/mxfenc.c libavformat/oggenc.c libavformat/swf.h libavformat/version.h tests/ref/lavf/mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov2014-06-18
| | | | | | | | | | | | | | | | | | | | | | | | Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
* | avformat/mux: Dont leave stale side data pointers in ff_interleave_add_packet()Michael Niedermayer2014-06-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: fix memleak of side data in flac fate testsMichael Niedermayer2014-06-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: Remove localized encoder stringsMichael Niedermayer2014-05-20
| | | | | | | | | | | | Fixes muxing to end up with a encoder=Lavf... and encoder_eng=somethingelse Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c'Michael Niedermayer2014-05-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c': lavf: deprecate now unused AVStream.pts Conflicts: libavformat/mux.c libavformat/version.h mostly not merged as the code is needed for a/vsync drop handling and what the code does is what is needed, it could maybe be moved elsewhere or factored somehow but simply removing it would be droping these features. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: deprecate now unused AVStream.ptsAnton Khirnov2014-05-19
| |
| * mux: drop one of the hacks comprising compute_pkt_fields2()Anton Khirnov2014-05-19
| | | | | | | | All encoders should output proper timestamps now.
* | Merge commit 'c9281a01b78cc3f09e36300a0ca3f5824d1c74cf'Michael Niedermayer2014-05-15
|\| | | | | | | | | | | | | | | | | | | * commit 'c9281a01b78cc3f09e36300a0ca3f5824d1c74cf': lavf: drop the zero-sized packets hack Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: drop the zero-sized packets hackAnton Khirnov2014-05-15
| | | | | | | | | | | | There should not be any valid reason anymore for passing completely empty packets to lavf. OTOH side data-only packets can be useful.
* | Merge commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52'Michael Niedermayer2014-05-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52': lavf: add AVFMT_FLAG_BITEXACT. Conflicts: doc/APIchanges libavformat/avformat.h libavformat/flacenc.c libavformat/movenc.c libavformat/oggenc.c libavformat/options_table.h libavformat/version.h tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add AVFMT_FLAG_BITEXACT.Anton Khirnov2014-05-15
| | | | | | | | | | | | | | | | Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's codec context. Using codec options inside lavf is fragile and can easily break when the muxing codec context is not the encoding context.
* | lavf/mux: pass options to nested structs of priv dataLukasz Marek2014-05-04
| | | | | | | | | | | | | | | | | | This is continuation of commit 330d547e Nested struct is set in two places. Previous commit set nested struct only in one case. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mux: pass options to nested structs of priv dataLukasz Marek2014-05-02
| | | | | | | | | | | | | | | | This commit allows to benefit from implementing child_next callback for muxers' AVClasses. Without that, options cannot be set in nested structs. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | avformat/mux: Check for and remove invalid packet durationsMichael Niedermayer2014-04-23
| | | | | | | | | | | | | | Fixes assertion failure Fixes Ticket3575 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Various small spelling fixes.Reimar Döffinger2014-04-22
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avformat/mux: support shifting timestamps so they start at 0Michael Niedermayer2014-02-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>