summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* lavf/flvdec: Set avg_frame_rate for video streams.Carl Eugen Hoyos2016-11-25
| | | | | Requested-by: qw, applemax82 at 163 dot com Reviewed-by: Steven Liu
* flvdec: require need_context_update when changing codec idAndreas Cadhalpun2016-11-25
| | | | | | | | Otherwise the codec context and codecpar might disagree on the codec id, triggering asserts in av_parser_parse2. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* sbgdec: prevent NULL pointer accessAndreas Cadhalpun2016-11-23
| | | | | Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* rmdec: validate block alignmentAndreas Cadhalpun2016-11-23
| | | | | | | This fixes division by zero crashes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/mpeg: Adjust vid probe threshold to correct mis-detectionMichael Niedermayer2016-11-23
| | | | | | Fixes: _ij.mp3 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mxfdec: fix NULL pointer dereference in mxf_read_packet_oldAndreas Cadhalpun2016-11-23
| | | | | | | Metadata streams have priv_data set to NULL. Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/flvenc: add no_metadata to flvflagsSteven Liu2016-11-22
| | | | | | | some flv have no metadata, ffmpeg will same with the source flv stream. Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
* avformat/utils: add missing brackets around arguments in av_realloc() callJames Almer2016-11-21
| | | | | Found-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: Restrict experimental VP9 support to MODE_MP4.Matthew Gregan2016-11-21
| | | | | Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: James Almer <jamrial@gmail.com>
* Add experimental demuxing support for FLAC in ISO BMFF (MP4).Matthew Gregan2016-11-21
| | | | | | | Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: James Almer <jamrial@gmail.com>
* Add experimental muxing support for FLAC in ISO BMFF (MP4).Matthew Gregan2016-11-21
| | | | | | | | | Based on the draft spec at https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt '-strict experimental' is required to create files in this format. Signed-off-by: Matthew Gregan <kinetik@flim.org> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: write updated STREAMINFO metadata for FLAC streams if ↵James Almer2016-11-20
| | | | | | | | | | | available FLAC streams originating from the FLAC encoder send updated and more complete STREAMINFO metadata as part of the last packet, so write that to CodecPrivate instead of the incomplete one available in extradata during init. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: postpone writing the Tracks masterJames Almer2016-11-20
| | | | | | | This will allow us to write updated stream information not available during write_header(). Signed-off-by: James Almer <jamrial@gmail.com>
* ffmdec: validate codec parametersAndreas Cadhalpun2016-11-20
| | | | | | | | A negative extradata size for example gets passed to memcpy in avcodec_parameters_from_context causing a segmentation fault. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/utils: check for overflow before reallocating side dataJames Almer2016-11-19
| | | | | | | This makes av_stream_add_side_data() consistent with av_packet_add_side_data(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroska: use av_stream_add_side_data() for stereo3d side dataJames Almer2016-11-19
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: reuse existing err variableJames Almer2016-11-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: use av_stream_add_side_data() for displaymatrix side dataJames Almer2016-11-18
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: add av_stream_add_side_data()James Almer2016-11-18
| | | | | | | | Functionally similar to av_packet_add_side_data(). Allows the use of an already allocated buffer as stream side data. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flvdec: add debug message to list keyframes index metadataSteven Liu2016-11-19
| | | | | | | when parsing keyframe index metadata, list the message by trace log Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/apngenc: use the stream parameters extradata if availableJames Almer2016-11-18
| | | | | | | Fixes remuxing apng streams coming from the apng demuxer, which sends extradata during init. Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "apngdec: use side data to pass extradata to the decoder"James Almer2016-11-18
| | | | | | | | | | | | | This reverts commit e0c6b32046f4bab7d34be77dd2f03b2a80c86d39. Said commit changed the behavior of the demuxer and decoder in a non backwards compatible way. Demuxers should make extradata available at init if possible, and send new extradata as side data within a packet if needed. A better fix for the remuxing crash will follow. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: Check frame rate before use.Michael Niedermayer2016-11-17
| | | | | | | | | Fixes division by 0 This is similar to how avg_frame_rate is checked elsewhere Fixes: 6d24add0455f41b1b45b7ba615cd46f3/asan_generic_dc34c3_5480_0a2ef411cae999b9871ed71a2e481b71.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '4f7723cb3b913c577842a5bb088c804ddacac8df'Hendrik Leppkes2016-11-17
|\ | | | | | | | | | | | | * commit '4f7723cb3b913c577842a5bb088c804ddacac8df': movenc: Add an option for skipping writing the mfra/tfra/mfro trailer Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * movenc: Add an option for skipping writing the mfra/tfra/mfro trailerMartin Storsjö2016-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing a fragmented file, we by default write an index pointing to all the fragments at the end of the file. This causes constantly increasing memory usage during the muxing. For live streams, the index might not be useful at all. A similar fragment index is written (but at the start of the file) if the global_sidx flag is set. If ism_lookahead is set, we need to keep data about the last ism_lookahead+1 fragments. If no fragment index is to be written, we don't need to store information about all fragments, avoiding increasing the memory consumption linearly with the muxing runtime. This fixes out of memory situations with long live mp4 streams. Signed-off-by: Martin Storsjö <martin@martin.st>
| * matroskadec: export CodecDelayAnton Khirnov2016-07-03
| |
| * oggparseopus: export pre-skipAnton Khirnov2016-07-02
| | | | | | | | Bug-Id: 945, along with the following commit
* | lavf/Makefile: Fix rule for the data muxer.Carl Eugen Hoyos2016-11-14
| |
* | Merge commit '029cf99c5166b36f33381cd8ebfa5f1f1f463d1f'Hendrik Leppkes2016-11-14
|\| | | | | | | | | | | | | | | | | * commit '029cf99c5166b36f33381cd8ebfa5f1f1f463d1f': mov: Save number of stsd elements after stream extradata allocation Mostly noop, see 8b43ee4054af799e388d380b379a13a60849c1b5 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * mov: Save number of stsd elements after stream extradata allocationVittorio Giovara2016-06-29
| | | | | | | | | | | | | | Avoid freeing an unallocated array in mov_read_close() in case of a malloc failure. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'Hendrik Leppkes2016-11-14
|\| | | | | | | | | | | | | * commit 'e72d6fa08a3c1876109149401753a8d2c736d418': build: Move MP2 muxer declaration away from MP3 muxer code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * build: Move MP2 muxer declaration away from MP3 muxer codeDiego Biurrun2016-06-29
| | | | | | | | The MP2 muxer uses none of the code of the MP3 muxer.
* | lavf/mux: don't warn about missing timestamps on attached picturesRodger Combs2016-11-14
| |
* | Merge commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05'Hendrik Leppkes2016-11-13
|\| | | | | | | | | | | | | * commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05': movenc: Apply offsets on timestamps when peeking into interleaving queues Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * movenc: Apply offsets on timestamps when peeking into interleaving queuesMartin Storsjö2016-06-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * librtmp: Avoid an infiniloop setting connection argumentsLuca Barbato2016-06-22
| | | | | | | | | | | | The exit condition was missing. CC: libav-stable@libav.org
* | filmstripdec: correctly check image dimensionsAndreas Cadhalpun2016-11-13
| | | | | | | | | | | | | | This prevents a division by zero in read_packet. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat: Add Pro-MPEG CoP #3-R2 FEC protocolVlad Tarca2016-11-13
| | | | | | | | | | | | | | Pro-MPEG Code of Practice #3 release 2 forward error correction for rtp_mpegts streams Signed-off-by: Vlad Tarca <vtarca@mobibase.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/fifo: fix undefined behaviour in deinit when destroying mutexMarton Balint2016-11-13
| | | | | | | | | | Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mov: zero initialize codec_name in mov_parse_stsd_video()James Almer2016-11-12
| | | | | | | | | | | | | | Fixes valgrind warning about "Conditional jump or move depends on uninitialised value(s)" Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | increment initial_prog_date_time when removing old segmentsRobert Nagy2016-11-12
| | | | | | | | | | | | | | | | Fixes https://trac.ffmpeg.org/ticket/5940#ticket Reviewed-by: Michael Niedermayer <<michael@niedermayer.cc>> Signed-off-by: Robert Nagy <ronag89@gmail.com> Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
* | icodec: correctly check avio_read return valueAndreas Cadhalpun2016-11-10
| | | | | | | | | | | | | | | | | | | | | | It can read less than the requested amount, in which case buf contains uninitialized data, causing problems like segmentation faults later on. Also make sure that image->size is positive, so that it can't match a negative error code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | lavf/mov.c: Fallback to finding non-keyframe in fix_index, if keyframe ↵Sasi Inguva2016-11-10
| | | | | | | | | | | | | | | | search fails. Signed-off-by: Sasi Inguva <isasi@google.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/flvenc: add add_keyframe_index optionSteven Liu2016-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add keyframe index metadata Used to facilitate seeking; particularly for HTTP pseudo streaming. 1. read live streaming or file by sequence 2. if use add_keyframe_index option, add a mark flag at the position, use to insert new context at the last step. 3. add the keyframes *offset* and *timestamp* into a list 4. if use add_keyframe_index option, shift the metadata data from mark flag offset 5. insert the keyframes *offset* and *timestamp* from the list by sequence 6. free the list 7. end. Add FATE test case; Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Steven Liu <liuqi@gosun.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | nut: add gray12 supportMichael Niedermayer2016-11-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | icodec: add ico_read_close to fix leaking ico->imagesAndreas Cadhalpun2016-11-09
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | icodec: fix leaking pkt on errorAndreas Cadhalpun2016-11-09
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | mpegts: prevent division by zeroAndreas Cadhalpun2016-11-08
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_headerAndreas Cadhalpun2016-11-08
| | | | | | | | | | | | | | The code assumes that s->streams[0] is valid. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/matroskadec: fix DiscardPadding element parsingJames Almer2016-11-08
| | | | | | | | | | | | | | | | | | | | If the value is negative then it means padding at the start of the packet instead of at the end. Based on a patch by Hendrik Leppkes. Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org> Signed-off-by: James Almer <jamrial@gmail.com>