summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* matroskadec: use av_grow_packet in merge_packets.Nicolas George2012-04-16
| | | | | | | It ensures that the packet is properly padded and makes the code simpler. Fixes trac ticket #1223.
* Add skip_to_keyframe stream variable.Reimar Döffinger2012-04-16
| | | | | | | | | | | | This replaces the matroskadec one with the same name. The advantage is not only easier reuse in other demuxers but also that we can make the decisions after the parser. This fixes seeking in files that mark the keyframes incorrectly, for example the file in track ticket #1003. The matroska variable is still kept to be able to complain about such broken files. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* omadec: make sample rate table large enough to prevent out of array reading.Michael Niedermayer2012-04-16
| | | | | | | The new values lead to error messages when used Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 4xmdemux: Check chunk sizeMichael Niedermayer2012-04-16
| | | | | | | Fixes over reading the header array Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* omadec: check GEOB sizes against buffer sizeMichael Niedermayer2012-04-16
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* flvdec: allocate large enough buffer so get_bits() doesnt overreadMichael Niedermayer2012-04-16
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* segafilm: make the loop condition in film_read_packet() match the contents.Michael Niedermayer2012-04-16
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mov: reset dref_count on realloc to keep values consistent.Michael Niedermayer2012-04-15
| | | | | | This fixes a potential crash. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doc: Improve suggested Emacs settings for our coding style. utvideo: Remove unused variable 'src_size' mov: free memory on header parsing failure mov: fix leaking memory with multiple drefs. swscale: clip before assigning tables in RGB output functions. swscale: fix off-by-one in second coefficient in bilinear filters. Conflicts: libavformat/mov.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: free memory on header parsing failureDale Curtis2012-04-14
| | | | | | | | | | | | Call mov_read_close when mov_read_header fails. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mov: fix leaking memory with multiple drefs.Dale Curtis2012-04-14
| | | | | | | | | | | | | | | | | | Instead of allocating over the original, free first. MOVStreamContext is zero initialized so no double free will occur. Same style as other fixes for the same problem in this file. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vsrc_buffer: fix check from 7ae7c41. libxvid: Reorder functions to avoid forward declarations; make functions static. libxvid: drop some pointless dead code wmal: vertical alignment cosmetics wmal: Warn about missing bitstream splicing feature and ask for sample. wmal: Skip seekable_frame_in_packet. wmal: Drop unused variable num_possible_block_size. avfiltergraph: make the AVFilterInOut alloc/free API public graphparser: allow specifying sws flags in the graph description. graphparser: fix the order of connecting unlabeled links. graphparser: add avfilter_graph_parse2(). vsrc_buffer: allow using a NULL buffer to signal EOF. swscale: handle last pixel if lines have an odd width. qdm2: fix a dubious pointer cast WMAL: Do not try to read rawpcm coefficients if bits is invalid mov: Fix detecting there is no sync sample. tiffdec: K&R cosmetics avf: has_duration does not check the global one dsputil: fix optimized emu_edge function on Win64. Conflicts: doc/APIchanges libavcodec/libxvid_rc.c libavcodec/libxvidff.c libavcodec/tiff.c libavcodec/wmalosslessdec.c libavfilter/avfiltergraph.h libavfilter/graphparser.c libavfilter/version.h libavfilter/vsrc_buffer.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Fix detecting there is no sync sample.Yusuke Nakamura2012-04-13
| | | | | | | | | | | | Stss atom without entries doesn't mean every sample is a sync sample. Signed-off-by: Martin Storsjö <martin@martin.st>
| * avf: has_duration does not check the global oneLuca Barbato2012-04-13
| | | | | | | | | | Some container formats report a global duration, but not a per stream one.
* | matroskadec: fix null pointer dereferenceMichael Niedermayer2012-04-14
| | | | | | | | | | | | Fixes: Ticket1206 Found-by: John Villamil Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | wtvdec: fix name_size check to consider integer overflows.Michael Niedermayer2012-04-14
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | latmenc: replace per-frame malloc/free by constant size buffer.Reimar Döffinger2012-04-14
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avidec: handle 0-size packets that exist only in index.Reimar Döffinger2012-04-14
| | | | | | | | | | | | | | | | | | | | | | 0-sized packets are used to implement variable fps. However there seems to be a variation where these are not even stored in the main file but as 0-size index entries only. This fixes the sample in trac issue #957, it now plays both the same ways as in MPlayer and in a way that looks correct. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | mp3enc: clarify meaning of "Unsupported" messages.Reimar Döffinger2012-04-14
| | | | | | | | | | | | | | | | They will only cause us to skip writing the Xing header, not cause any serious breakage. Related to trac issue #1027. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavf: print with debug level the byte positions before and after ↵Michael Niedermayer2012-04-14
| | | | | | | | | | | | find_stream_info Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avidec: update size when packet is shrunkMichael Niedermayer2012-04-14
| | | | | | | | | | | | | | Fixes out of array read Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: swscale: K&R formatting cosmetics (part II) tiffdec: Add a malloc check and refactor another. faxcompr: Check malloc results and unify return path configure: escape colons in values written to config.fate ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE matroska: Fix leaking memory allocated for laces. pthread: Fix crash due to fctx->delaying not being cleared. vp3: Assert on invalid filter_limit values. h264: fix 10bit biweight functions after recent x86inc.asm fixes. ffv1: Fix size mismatch in encode_line. movenc: Remove a dead initialization git-howto: Explain how to avoid Windows line endings in git checkouts. build: Move all arch OBJS declarations into arch subdirectory Makefiles. Conflicts: configure libavcodec/vp3.c libavformat/matroskadec.c libavutil/Makefile libswscale/Makefile libswscale/swscale.c libswscale/swscale_internal.h libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroska: Fix leaking memory allocated for laces.Dale Curtis2012-04-12
| | | | | | | | | | | | | | | | | | | | During error conditions matroska_parse_block may exit without freeing the memory allocated for laces. Found via valgrind: http://pastebin.com/E54k8QFU Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * movenc: Remove a dead initializationAlex Converse2012-04-12
| |
* | mov: zero sc->pb in mov_read_close()Michael Niedermayer2012-04-13
| | | | | | | | | | | | | | Its bad to free things without zeroing them. This fixes a potential issue when mov_read_close() would be called twice. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: Fix memory leaks on aborted header parsing.Dale Curtis2012-04-13
| | | | | | | | | | | | | | | | If mov_read_header exits under error, the memory allocated is not freed. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: zero extradata_size on deallocation of extradata.Michael Niedermayer2012-04-13
| | | | | | | | | | | | This prevents the possibility of extradata and its size becoming desynced. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroska: Fix leaking memory allocated for laces.Dale Curtis2012-04-13
| | | | | | | | | | | | | | | | | | | | During error conditions matroska_parse_block may exit without freeing the memory allocated for laces. Found via valgrind: http://pastebin.com/E54k8QFU Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: Fix harmless OOB read.Dale Curtis2012-04-13
| | | | | | | | | | | | | | | | Convert key_off initialize to use the same sc->keyframe_count as used elsewhere in the function. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libxvid: remove disabled code qdm2: make a table static const qdm2: simplify bitstream reader setup for some subpacket types qdm2: use get_bits_left() build: Consistently handle conditional compilation for all optimization OBJS. avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics msrle: convert MS RLE decoding function to bytestream2. x86inc improvements for 64-bit Conflicts: common.mak libavcodec/avpacket.c libavcodec/bfi.c libavcodec/msrledec.c libavcodec/qdm2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmeticsDiego Biurrun2012-04-12
| |
* | latmenc: validate extradata size.Reimar Döffinger2012-04-12
| | | | | | | | | | | | | | | | | | Fixes potential out-of-bounds writes. This is mostly possible when muxing ALS files where from an extradata size of about 1050 put_bits would write data outside the buffer. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: simplify using avpriv_copy_bits.Reimar Döffinger2012-04-12
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: Document assumptions when copying the AAC header.Reimar Döffinger2012-04-12
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: copy pce config from proper location.Reimar Döffinger2012-04-12
| | | | | | | | | | | | | | | | | | For the FATE test sample used, this only avoids a warning message. However for other samples like al05_44.mp4 the converted file can be played only after this fix. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: fix muxing of byte-aligned DSE.Reimar Döffinger2012-04-12
| | | | | | | | | | | | | | | | This will only work for DSEs that are first in a packet, but that is enough to fix handling of the reference files in fate-suite/aac (though most of them still have other issues). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavf: compute_pkt_fields, limit the pts upcorrection to mpegMichael Niedermayer2012-04-12
| | | | | | | | | | | | | | The pts correction conflicts with the ogg vorbis demuxer. Thanks-to: Justin Ruggles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: always call avio_flush in av_write_trailer.Reimar Döffinger2012-04-12
| | | | | | | | | | | | | | | | | | | | Otherwise for muxers like e.g. latmenc that never call avio_flush (and do not have a write_trailer function) a part of the data will always be missing. Also update references for the voc muxer, which was also buggy before and did not write out all data. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avplay: Don't free video filters string until the end of decoding. movenc: small refactor mov_write_packet movenc: remove redundant check interplayvideo: fix av_dlog parameter type mismatch Drop some pointless #ifdefs. Conflicts: libavcodec/interplayvideo.c libavcodec/libxvidff.c libavcodec/snowenc.c libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: small refactor mov_write_packetLuca Barbato2012-04-11
| | | | | | | | | | | | | | | | | | | | Share the formerly internal write_packet with the hinter and move the fragment flush logic to the user facing one since it is not concerned about movtrack-only streams. Fixes bug #263 Signed-off-by: Martin Storsjö <martin@martin.st>
| * movenc: remove redundant checkLuca Barbato2012-04-11
| | | | | | | | | | | | The proper check is already in mov_write_header. Signed-off-by: Martin Storsjö <martin@martin.st>
| * Drop some pointless #ifdefs.Diego Biurrun2012-04-10
| | | | | | | | The files are only compiled if the #ifdef conditions are met.
* | latmenc: error out when packet size is too large.Reimar Döffinger2012-04-11
| | | | | | | | | | | | | | Previously it would just silently write out incorrect data. This also fixes a potential integer overflow in the allocation. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: Fix ALS in LATM.Reimar Döffinger2012-04-11
| | | | | | | | | | | | | | | | "Fix" in so far as at least it will no longer overread and possibly crash and makes somewhat sense, but no idea whether there is anything that can play the resulting files (FFmpeg can't). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: remove unused return value.Reimar Döffinger2012-04-11
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: remove dead code.Reimar Döffinger2012-04-11
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | oggparsevorbis: Remove code messing with cur_dts.Michael Niedermayer2012-04-11
| | | | | | | | | | | | | | This code caused first_dts to become corrupt and in value to be around relative_ts. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) rv40dsp x86: use only one register, for both increment and loop counter rv40dsp: implement prescaled versions for biweight. avconv: use default channel layouts when they are unknown avconv: parse channel layout string nutdec: K&R formatting cosmetics vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata mem: Consistently return NULL for av_malloc(0) vf_overlay: implement poll_frame() vf_scale: support named constants for sws flags. lavc doxy: add all installed headers to doxy groups. lavc doxy: add avfft to the main lavc group. lavc doxy: add remaining avcodec.h functions to a misc doxygen group. lavc doxy: add AVPicture functions to a doxy group. lavc doxy: add resampling functions to a doxy group. lavc doxy: replace \ with / lavc doxy: add encoding functions to a doxy group. lavc doxy: add decoding functions to a doxy group. lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO} lavc doxy: add AVPacket-related stuff to a separate doxy group. lavc doxy: add core functions/definitions to a doxy group. ... Conflicts: ffmpeg.c libavcodec/avcodec.h libavcodec/vda.c libavcodec/x86/rv40dsp.asm libavfilter/vf_scale.c libavformat/nutdec.c libavutil/mem.c tests/ref/acodec/pcm_s24daud Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nutdec: K&R formatting cosmeticsAsen Lekov2012-04-10
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-08
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtsp: Don't use av_malloc(0) if there are no streams rtsp: Don't use uninitialized data if there are no streams vaapi: mpeg2: fix slice_vertical_position calculation. hwaccel: mpeg2: decode first field, if requested. cosmetics: Fix indentation rtsp: Don't expose the MS-RTSP RTX data stream to the caller Merged-by: Michael Niedermayer <michaelni@gmx.at>