summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* 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>
* avformat/mov: Read multiple stsd from DVVittorio Giovara2016-11-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hls: fix leaking avio_opts on hls_read_header errorAndreas Cadhalpun2016-11-07
| | | | | | | Use the hls_close function to reduce code duplication. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* hls: move hls_close above hls_read_headerAndreas Cadhalpun2016-11-07
| | | | | | | This is needed for the following commit. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/hls: Add missing error check for avcodec_parameters_copy()Anssi Hannula2016-11-07
| | | | Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* avformat/hls: Fix probing mpegts audio streams that use probingAnssi Hannula2016-11-07
| | | | | | | | | | | | | Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some cases with MPEG TS") caused a regression where subdemuxer streams that use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly. This is because the codec parameters from the subdemuxer stream, once probed, are not passed on to the main stream. Fix that by updating the codec parameters if the codec id changes. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* avformat/hls: Factor copying stream info to a separate functionAnssi Hannula2016-11-07
| | | | Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* xmv: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | | | AVCodecParameters.sample_rate is a signed integer, so XMVAudioPacket.sample_rate should be, too. A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* voc_packet: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* oggparsespeex: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* nuv: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mvdec: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mpeg4audio: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Also check for errors from avpriv_mpeg4audio_get_config in ff_mp4_read_dec_config_descr. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mov: validate sidx timescaleAndreas Cadhalpun2016-11-07
| | | | | | | A negative timescale doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mov: validate time_scaleAndreas Cadhalpun2016-11-07
| | | | | | | A negative timescale doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mov: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. fate-aac-al07_96 fails if sample_rate == 0 is rejected in ff_mov_read_stsd_entries. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* ffmdec: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* bfi: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* adxdec: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/flvenc: support mp3 audio with 48khzfuqiuping2016-11-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/tcp: Put struct sockaddr_in6 under #ifMichael Niedermayer2016-11-06
| | | | | | | Fixes: error: dereferencing pointer to incomplete type Tested-by: Dave Yeo <daveryeo@telus.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/mpegtsenc: write metadata descriptor for timed ID3 packetsStefano Sabatini2016-11-06
| | | | | | | | This is required since some programs are not able to correctly recognize the metadata. See H.222, 2.6.58 Metadata pointer descriptor. putstr8() is modified in order to allow to skip writing the string length.
* lavf/mpegtsenc: move putstr8 definition upStefano Sabatini2016-11-06
| | | | This allows to use the function in a future commit.
* avformat/mux: remove unnecessary autobsf hackJames Almer2016-11-05
| | | | | | autobsf has been ported to the new bsf API. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/framehash: also print channel layout as a stringJames Almer2016-11-05
| | | | | | | | This should be more useful for users since numerical values for channel layout can be confusing and unintuitive. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* mxfdec: fix NULL pointer dereferenceAndreas Cadhalpun2016-11-05
| | | | | | | Metadata streams have priv_data set to NULL. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/tcp: workaround for IOS9 getaddrinfo in IPv6 only network use ↵liu jc2016-11-05
| | | | | | | hardcode IPv4 address can not resolve port number. Signed-off-by: liujingchao <jcliu@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtpdec: Add support for 24 bit RTSP audio playbackTimur Aydin2016-11-05
| | | | | | | | | When ffplay is used to play from the RTSP URL that serves 24 bit audio content, ffplay fails to recognize the audio codec format. The attached patch adds support for playing 24 bit audio content over RTSP by defining a dynamic payload handler for "L24". Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avisynth.c: Use new safe dlopen code.Matt Oliver2016-11-05
| | | | Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* avformat/mux: split side data before internal auto BSFMichael Niedermayer2016-11-04
| | | | | | | | | The bitstream filters do not work with merged in side data This leaves the input packet split if it is being split. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "avformat/mux: split side data earlier in av_write_frame and ↵James Almer2016-11-04
| | | | | | | | | | | av_interleaved_write_frame" This reverts commit fba2a8a254997e0db39a30438e96e5f3e44c669a. The changes were right for av_write_frame() but not for av_interleaved_write_frame(). The following commit will fix this in a simpler way. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/movenc: Do not print an error when muxing gray8 rawvideo.Carl Eugen Hoyos2016-11-05
| | | | This was fixed in 9a2778082121ea44d06a2f00f822ea99109c7fd8
* avformat/mux: split side data earlier in av_write_frame and ↵James Almer2016-11-04
| | | | | | | | | | | av_interleaved_write_frame Similarly, merge it back before returning. Fixes ticket #5927. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/mux: Add missing CR/LF to error messages.Carl Eugen Hoyos2016-11-04
|
* lavf/mov.c: Use the first sidx for tracks without sidx.Sasi Inguva2016-11-03
| | | | | | | | According to spec ISO_IEC_15444_12 "For any media stream for which no segment index is present, referred to as non‐indexed stream, the media stream associated with the first Segment Index box in the segment serves as a reference stream in a sense that it also describes the subsegments for any non‐indexed media stream." 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: close parser if codec changedAndreas Cadhalpun2016-11-02
| | | | | | | | | The parser depends on the codec and thus must not be used with a different one. If it is, the 'avctx->codec_id == s->parser->codec_ids[0] ...' assert in av_parser_parse2 gets triggered. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avformat/matroskaenc: use display aspect ratio for DisplayWidth and ↵James Almer2016-11-02
| | | | | | | | | | | | | DisplayHeight when possible This avoids potential rounding errors and guarantees the source aspect ratio is preserved. Keep writing pixel values when Stereo 3D Mode is enabled and for WebM, as the format doesn't support anything else. This fixes ticket #5743, implementing the suggestion from ticket #5903. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: support writing Chroma Location elementsJames Almer2016-11-02
| | | | Signed-off-by: James Almer <jamrial@gmail.com>