summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/ffmdec: Silence "may be used uninitialized in this function" warningsMichael Niedermayer2016-12-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: cleanup on extradata memory allocation failureMichael Niedermayer2016-12-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: Forward error code from ffm_read_header()Michael Niedermayer2016-12-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: remove last use of st->codecMichael Niedermayer2016-12-03
| | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/asfdec_f: Remove CR/LF from avpriv_request_sample() call.Carl Eugen Hoyos2016-12-03
|
* avformat/ffmdec: Drop flags2, debug and codec->time_base settingMichael Niedermayer2016-12-03
| | | | | | It should still be possible to set these through recommended_encoder_configuration Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: Check media type for chunksMichael Niedermayer2016-12-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: replace most codec uses by codecparMichael Niedermayer2016-12-03
| | | | | | | This is a bit messy as codecar does not support AVOptions so we need to use AVCodecContext where AVOptions are required and copy back and forth. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmdec: Remove some st->codec uses which set encoder parametersMichael Niedermayer2016-12-03
| | | | | | Modern ffserver should not need these Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggparsespeex: Check frames_per_packet and packet_sizeMichael Niedermayer2016-12-03
| | | | | | | | | | | The speex specification does not seem to restrict these values, thus the limits where choosen so as to avoid multiplicative overflow Fixes undefined behavior Fixes: 635422.ogg Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Check start/end before computing duration in ↵Michael Niedermayer2016-12-03
| | | | | | | | | | update_stream_timings() Fixes undefined behavior Fixes: 637428.ogg Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hevc: Support extradata changesVittorio Giovara2016-12-02
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat/ffmenc: Remove the last use of st->codecMichael Niedermayer2016-12-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmenc: Make ffm_write_header_codec_ctx() use codecparMichael Niedermayer2016-12-02
| | | | | | | | | This would be simpler if codecpar supported AVOptions modern ffserver should be unaffected by this, older ffserver which required the muxer to directly access the encoder could have issues with this, but this direct access is just wrong and unsafe Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmenc: set bitexact mode for old API without accessing the encoderMichael Niedermayer2016-12-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmenc: Drop ffm_write_header_codec_private_ctx()Michael Niedermayer2016-12-02
| | | | | | | | | This accesses the private encoder context, it should not be used by the current ffserver it may affect old ffserver versions but i believe there is consens that accessing the private encoder context from the muxer is completely wrong. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ffmenc: Replace some st->codec use by codecparMichael Niedermayer2016-12-02
| | | | | | Note, this temporarly drops the ability to set ffmpeg encoder debug and flags2 via ffserver.conf Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* matroskadec: partly revert "demux relevant subtitle packets after a seek"Rainer Hochecker2016-12-02
| | | | | | | | | | | | | This reverts parts of c16582579b1c6f66a86615c5808cd5b2bf17be73. The hard coded 30 seconds are a lot, and finishing the seek can takes several seconds when the source is on a network share. Remove this code entirely, because it does more bad than good. (Commit message provided by committer, based on the original messages by the patch author.) Signed-off-by: Rainer Hochecker <fernetmenta@online.de> Signed-off-by: wm4 <nfxjfg@googlemail.com>
* avformat/tests/fifo_muxer: includes libavformat/network.h to define ↵Gregory J. Wolfe2016-12-01
| | | | | | ETIMEDOUT for fate build. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mov: Evaluate the movie display matrixVittorio Giovara2016-11-30
| | | | | | | | | This matrix needs to be applied after all others have (currently only display matrix from trak), but cannot be handled in movie box, since streams are not allocated yet. So store it in main context, and apply it when appropriate, that is after parsing the tkhd one. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avidec: fix leaking extradataAndreas Cadhalpun2016-11-30
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* matroskadec: prevent access of elements after freeingMichael Schenk2016-11-30
| | | | | | | | | | Using the decode interrupt feature of ffmpeg may cause crashes by accessing previously freed pointers in matroska_read_close. To prevent this reset nb_elem to zero after freeing the elements, because ffmpeg normally tests for nb_elem. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* idroqdec: fix leaking pkt on failureAndreas Cadhalpun2016-11-30
| | | | | | | | The code calls av_new_packet a few lines above and the allocated memory has to be freed in case of an error. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/idroqdec: Check chunk_size for being too largeMichael Niedermayer2016-11-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmenc: Check framerate before storingMichael Niedermayer2016-11-27
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/utils: Fix type mismatchMichael Niedermayer2016-11-27
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: always forward codec_whitelist in avformat_find_stream_infoAndreas Cadhalpun2016-11-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* refine avformat/flvdec set bit_rateSteven Liu2016-11-26
|
* avformat/flvdec: move set bit_rate from parse AMF OBJECT toSteven Liu2016-11-26
| | | | | | | | | | | | | create_stream before patch: Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 640:357], 25 fps, 25 tbr, 1k tbn, 50 tbc after patch: Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 640:357], 2576 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvenc: fix ticket 5976 and use old commitSteven Liu2016-11-26
| | | | | | | | | mythtv have problem with non-seekable dont write duration and filesize and there have problem with some other server and player with 0 value duation and filesize. So add a flv flags to fix the ticket and make a choose for users. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* 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>