summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* lavf: move TLS-related ifdeffery to library specific fileswm42015-05-27
| | | | | | There is no need to have this mess in network.c. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: split tls.cwm42015-05-27
| | | | | | | | Move the OpenSSL and GnuTLS implementations to their own files. Other than the connection code (including options) and some boilerplate, no code is actually shared. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mpsubdec: Use double instead of float for timestamp calculationsMichael Niedermayer2015-05-27
| | | | | | | This provides higher precission Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mp3dec: Ensure the buffer is large enough to avoid seeks from the ↵Michael Niedermayer2015-05-27
| | | | | | first frame search Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mp3: skip junk at the beginning of mp3 fileswm42015-05-27
| | | | | | | | | | | | | | | | | Apparently it can happen that a mp3 file has junk data between id3 tag and actual mp3 data. Skip this to avoid outputting nonsense timestamps. (Two packets had the same timestamps, because the mp3 parser failed to compute a frame duration.) In this case, the junk consisted of 1044 bytes of zero, which incidentally is the same size as normal mp3 frames in this stream. I suspect the mp3 was edited with some tool which wiped the Xing/LAME headers. Data near the end of the file suggests it was encoded with "LAME3.97", but the normal Xing/LAME headers are missing. So this could be "normal". mpg123 also attempts to skip at least 64KB of junk data by scanning for headers. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mpsubdec: change multipler to int, it only stores 1 and 100Michael Niedermayer2015-05-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/movenc: Allow muxing mp3 with samplerate < 16khz if the user sets ↵Michael Niedermayer2015-05-27
| | | | | | | | | strict to -1 Fixes Ticket4267 Approved-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/matroskaenc: Avoid floats in default duration calculationMichael Niedermayer2015-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/ircamenc: Avoid floatsMichael Niedermayer2015-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/movenc: Avoid floats & float rounding in tmcd nb_frames calculationMichael Niedermayer2015-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/asfdec: Avoid float usage in duration calculationMichael Niedermayer2015-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mpegts: Avoid float in bitrate calculationMichael Niedermayer2015-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/dnxhd: Autodetect more files that can be decoded.Carl Eugen Hoyos2015-05-26
|
* mov: reject zero bytes_per_frame with non-zero samples_per_frameAndreas Cadhalpun2015-05-26
| | | | | | | In this case the mov demuxer can return a large number of empty packets. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* lavf/riff: Add 0x729A as TwoCC for G.729.Carl Eugen Hoyos2015-05-25
| | | | Reported by forum user muchuan.
* avformat/rmenc: Avoid floats in duration calculationMichael Niedermayer2015-05-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mpegenc: Replace *0.7 by *7/10Michael Niedermayer2015-05-25
| | | | | | | This avoids another float computation, avoiding a potential source of rounding issues Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mpegenc: Do not use floats for vcd_padding_bitrateMichael Niedermayer2015-05-25
| | | | | | This reduces the risk for rounding differences. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mov: Mark avio context of decompressed atoms as seekableMichael Niedermayer2015-05-25
| | | | | | Fixes Ticket4329 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mov: always check avio_read return valueAndreas Cadhalpun2015-05-24
| | | | | | | | | If avio_read fails, the buffer can contain uninitialized data. This fixes 'Conditional jump or move depends on uninitialised value(s)' valgrind warnings. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mov: fix two memleaksAndreas Cadhalpun2015-05-24
| | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mov: abort on EOF in ff_mov_read_chanAndreas Cadhalpun2015-05-24
| | | | | | Otherwise the loop can take a lot of time if num_descr is very large. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/movenc: Remove float use from rgb_to_yuv()Michael Niedermayer2015-05-24
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/swfenc: Remove another unneeded float computationMichael Niedermayer2015-05-24
| | | | | | fewer chances for rounding differences between platforms is better Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/swfenc: Remove unneeded floatsMichael Niedermayer2015-05-24
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/avienc: Avoid float usageMichael Niedermayer2015-05-23
| | | | | | reduces risk for rounding differences between platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/4xm: Change fps to AVRationalMichael Niedermayer2015-05-23
| | | | | | This fixes the video timebase as well Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* nutdec: fix various memleaks on failureAndreas Cadhalpun2015-05-23
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/wavdec: Increase dts packet threshold to fix more misdetectionsRodger Combs2015-05-23
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/wavdec: Increase probe_packets limitMichael Niedermayer2015-05-23
| | | | | | Fixes DTS detection of b2429e5ba9.dts Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* nutdec: always check the get_str return valueAndreas Cadhalpun2015-05-23
| | | | | | | | | | If it fails, the buffers can be (partially) uninitialized. This fixes 'Conditional jump or move depends on uninitialised value(s)' valgrind warnings. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/nutdec: Check X in 2nd branch of index readingMichael Niedermayer2015-05-23
| | | | | | | Prevents read of uninitialized variable Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mxfenc: Add color siting elementMichael Niedermayer2015-05-22
| | | | | | Previous version Reviewed-by: tim nicholson <nichot20@yahoo.com> Previous version Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavformat/mux: Add ff_choose_chroma_location()Michael Niedermayer2015-05-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* tls: fix compilation when both gnutls and openssl are enabledJames Almer2015-05-22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '94599a6de3822b13c94096d764868128f388ba28'Michael Niedermayer2015-05-22
|\ | | | | | | | | | | | | * commit '94599a6de3822b13c94096d764868128f388ba28': tls: Remove all the local polling loops Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tls: Remove all the local polling loopsMartin Storsjö2015-05-22
| | | | | | | | | | | | These aren't necessary any longer. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd13b124eaf452b267480074b2e6946538ed03a6e'Michael Niedermayer2015-05-22
|\| | | | | | | | | | | | | * commit 'd13b124eaf452b267480074b2e6946538ed03a6e': tls: Remove the nonblocking code Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tls: Remove the nonblocking codeMartin Storsjö2015-05-22
| | | | | | | | | | | | | | | | Since the underlying URLContext read functions are used, they handle interruption, without having to handle it at this level. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd15eec4d6bdfa3bd4c4b5b7dd2dbd699ba253d02'Michael Niedermayer2015-05-22
|\| | | | | | | | | | | | | * commit 'd15eec4d6bdfa3bd4c4b5b7dd2dbd699ba253d02': tls: Use custom IO to read from the URLContext Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tls: Use custom IO to read from the URLContextMartin Storsjö2015-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids hijacking the fd, by reading using the normal URLContext functions instead. This allowing reading data that has been buffered in the underlying URLContext. This avoids using the libraries own send functions that can cause SIGPIPE. The fd is still used for polling the lowlevel socket, for waiting for retries. Signed-off-by: Martin Storsjö <martin@martin.st>
* | WebP muxer: support a packet containing animated WebP.Urvang Joshi2015-05-22
| | | | | | | | | | | | | | This is the 1st patch in preparation for using WebPAnimEncoder API for encoding and muxing WebP images. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: check result of avio_seekZhang Rui2015-05-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mov: Use AVCOL_SPC constants when checking color_space.Carl Eugen Hoyos2015-05-21
| | | | | | | | Suggested-by: Ronald Bultje
* | lavf/mov: Write colour matrix "6" for color_space bt470bg.Carl Eugen Hoyos2015-05-21
| | | | | | | | This matches the demuxer's behaviour.
* | lavf/mkv: Only skip prores header if the packet is large enough.Carl Eugen Hoyos2015-05-21
| | | | | | | | Fixes a possible endless loop.
* | nutdec: abort if EOF is reached in decode_info_header/read_sm_dataAndreas Cadhalpun2015-05-20
| | | | | | | | | | | | | | These loops can take a lot of time if count is very large. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | nutdec: stop skipping bytes at EOFAndreas Cadhalpun2015-05-20
| | | | | | | | | | | | | | This can unnecessarily waste a lot of time. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | nutdec: fix infinite resync loopsAndreas Cadhalpun2015-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nut->last_syncpoint_pos doesn't necessarily change between resync attempts, so find_any_startcode can return the same startcode again. Thus remember where the last resync happened and don't try to resync before that. This can't be done locally in nut_read_packet, because this wouldn't prevent infinite resync loops, where after the resync a packet is returned and while reading a following packet the resync happens again. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/nutdec: Fix recovery when immedeately after seeking a failure happensMichael Niedermayer2015-05-20
| | | | | | | | | | Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>