summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* avformat/utils: be more strict about stream specifiersMarton Balint2019-03-01
| | | | | | | | | | | | This reworks the code to be more strict about accepting stream specifiers. From now on we strictly enforce the syntax in the documentation up until the decisive part of the stream specifier. Therefore matching stream specifiers always need to be correct, non matching specifiers only need to be correct until the decisive part. Also recursion is changed to a simple loop. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: write format_identifier HEVC for HEVC streamsMarton Balint2019-03-01
| | | | | | | | | | | | | This improves compatibility with some consumer (LG WebOS) TVs which apparently search a HEVC descriptor (which our mpegts muxer can't generate) or a format identifier. Since the HEVC format identifier is not registered (but used in the wild), it is not written if strict_std_compliance is higher than normal. This fixes the issue in ticket #7744. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: factorize writing registration_descriptorMarton Balint2019-03-01
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* mov: Fix start_time for streams with empty edits in the middleJustin Ruggles2019-02-26
| | | | | | | | | Empty edits can occur at any position within the edit list except for at the end. Empty edits in the middle should not impact the reported stream start_time or the video PTS adjustment, so only include empty edits at the start of the list in empty_edits_sum_duration. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* http: Do not try to make a new request when seeking past the end of the fileJustin Ruggles2019-02-26
| | | | | | | | | | This avoids making invalid HTTP Range requests for a byte range past the known end of the file during a seek. Those requests generally return a HTTP response of 416 Range Not Satisfiable, which causes an error response. Reference: https://tools.ietf.org/html/rfc7233 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat/dashenc: Added commentsKarthick J2019-02-25
| | | | Added comments regarding usage of certain movflags in streaming mode.
* avformat/dashenc: Added option to repeatedly publish master playlistKarthick J2019-02-25
| | | | The master playlist can be published at a specified interval with this option
* avformat:matroskadec: use a define to mark the EBML length is unknownSteve Lhomme2019-02-24
| | | | | | | | | | Unifying the way the EBML unknown length is signaled, rather than using two incompatible values. UINT64_MAX cannot be read as a valid EBML length with the current code. Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz> Co-authored-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* rtpenc_chain: forward strict_std_compliance flags to rtp muxerTristan Matthews2019-02-23
| | | | | fixes: https://trac.ffmpeg.org/ticket/6713 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegtsenc: add support for service and provider names with utf8 ↵Marton Balint2019-02-21
| | | | | | encoding Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/jacosubdec: compute subtitle duration correctlyAdam Sampson2019-02-20
| | | | | | | | | | | | | | | | | | When a JACOsub subtitle has two timestamps, they represent its start and end times (http://unicorn.us.com/jacosub/jscripts.html#l_times); the duration is the difference between the two, not the sum of the two. The subtitle end times in the FATE test for this were wrong as a result; fix them too. (This test is based on JACOsub's demo.txt, and the end time computed for the last line using @ now matches what the comments there say it should be.) Also tested in practice using MPV, a LaserDisc, and some authentic 1993 JACOsub files. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '90b15f60bf4919deaed66d868e18107eba371da7'James Almer2019-02-20
|\ | | | | | | | | | | | | * commit '90b15f60bf4919deaed66d868e18107eba371da7': srt: Set srto_sender flag to sender srt socket Merged-by: James Almer <jamrial@gmail.com>
| * srt: Set srto_sender flag to sender srt socketSven Dueking2019-02-12
| | | | | | | | | | | | | | | | | | | | | | | | SRT API Documentation: This flag is superfluous if both parties are at least version 1.3.0 (this shall be enforced by setting this value to SRTO_MINVERSION if you expect that it be true) and therefore support HSv5 handshake, where the SRT extended handshake is done with the overall handshake process. This flag is however obligatory if at least one party may be using SRT below version 1.3.0 and does not support HSv5.
* | lavf/mpeg: fix indentXiaofeng Wang2019-02-18
| | | | | | | | | | Signed-off-by: Xiaofeng Wang <xiaofeng.wang@bqvision.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/matroskadec: Check parents remaining lengthSteve Lhomme2019-02-17
| | | | | | | | | | This was found through the Hacker One program on VLC but is not a security issue in libavformat Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/webmdashenc: Check id in adaption_setsMichael Niedermayer2019-02-17
| | | | | | | | | | | | | | Fixes: out of array access Found-by: Wenxiang Qian Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/http: Fix Out-of-Bounds access in process_line()Wenxiang Qian2019-02-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/ftp: Fix Out-of-Bounds Access and Information Leak in ftp.c:393Wenxiang Qian2019-02-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/matroskadec: Do not leak queued packets on sync errorsMichael Niedermayer2019-02-17
| | | | | | | | | | | | | | | | | | Fixes: memleak Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280 Reported-by: Chris Cunningham <chcunningham@google.com> Tested-by: Chris Cunningham <chcunningham@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: Do not use reference stream in mov_read_sidx() if there is no ↵Michael Niedermayer2019-02-14
| | | | | | | | | | | | | | | | | | | | reference stream Fixes: NULL pointer dereference Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088 Reported-by: Chris Cunningham <chcunningham@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: parse some stream specifiers recursivelyMarton Balint2019-02-13
| | | | | | | | | | | | | | | | This removes lots of code duplication and also allows more complex specifiers, for example you can use p:204:a:m:language:eng to select the English language audio stream from program 204. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mpegts: also convert strings without a specified encoding to UTF-8Marton Balint2019-02-13
| | | | | | | | | | | | The default codepage (ISO6937) should be used in this case. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mpegts: fix charset of type 0x11Marton Balint2019-02-13
| | | | | | | | | | | | | | ISO-10646 alone means UCS-4 for iconv, the specs refers to the Basic Multilingual Plane (BMP), therefore we need UCS-2. VLC also using that. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mov: fix hang while seek on a kind of fragmented mp4Charles Liu2019-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binary searching would hang if the fragment items do NOT have timestamp for the specified stream. For example, a fmp4 consists of separated 'moof' boxes for each track, and separated 'sidx' for each segment, but no 'mfra' box. Then every fragment item only have the timestamp for one of its tracks. Example: ffmpeg -f lavfi -i testsrc -f lavfi -i sine -movflags dash+frag_keyframe+skip_trailer+separate_moof -t 1 out.mp4 ffmpeg -ss 0.5 -i out.mp4 -f null none Also fixes the hang in ticket #7572, but not the reason for having AV_NOPTS_VALUE timestamps there. Signed-off-by: Charles Liu <liuchh83@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mov: don't rescale mastering display values from the SmDm atomJames Almer2019-02-11
| | | | | | | | | | | | | | Simplifies code. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/img2: Move "loop" into common options.Carl Eugen Hoyos2019-02-10
| | | | | | | | | | While the image2pipe demuxer ignores the option - confusing users - the autodetecting demuxers that are favoured over image2 act on it.
* | lavf/img2dec: Split img2 and img2pipe options.Carl Eugen Hoyos2019-02-10
| |
* | avformat/hlsenc: fix fmp4_init_filename file name with %v problemSteven Liu2019-02-10
| | | | | | | | | | | | | | | | | | | | | | when set option fmp4_init_filename to init_%v.mp4 before patch: the init file will be init_%v_0.mp4, init_%v_1.mp4 after patch: the init file will be init_0.mp4, init_1.mp4 Reported-By: Gyan Doshi <ffmpeg@gyani.pro> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | lavf/mpegts: add reading of ARIB data coding descriptorJan Ekström2019-02-10
| | | | | | | | | | | | | | | | | | This enables us to read the data coding type utilized for a specific private data stream, of which we currently are interested in ARIB caption streams. The component tag limitations are according to ARIB TR-B14, and the component IDs are defined in ARIB STD-B10.
* | lavf/mpegts: Convert service_name and service_provider to utf-8.Carl Eugen Hoyos2019-02-09
| | | | | | | | Fixes ticket #6320.
* | avformat/mov: validate chunk_count vs stsc_datachcunningham2019-02-08
| | | | | | | | | | | | | | | | | | | | Bad content may contain stsc boxes with a first_chunk index that exceeds stco.entries (chunk_count). This ammends the existing check to include cases where chunk_count == 0. It also patches up the case when stsc refers to unknown chunks, but stts has no samples (so we can simply ignore stsc). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov.c: require tfhd to begin parsing trunchcunningham2019-02-08
| | | | | | | | | | | | | | | | | | | | Detecting missing tfhd avoids re-using tfhd track info from the previous moof. For files with multiple tracks, this may make a mess of the avindex and fragindex, which can later trigger av_assert0 in mov_read_trun(). Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/movenc: Add more error checking when writing sample entries.Nikolas Bowe2019-02-07
| | | | | | | | | | | | | | | | | | | | Fixes a problem where a sample entry which cannot be written correctly appears to succeed, but produces an invalid file. For example, this command: ffmpeg -f lavfi -i sine=frequency=1000:duration=5 -codec:a ac3 -movflags +empty_moov -frag_duration 5000000 /tmp/foo.mp4 produced a file with the ac-3 sample entry, but no AC3SpecificBox (dac3) child, which is invalid according to ETSI TS 102 366. Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavformat/dashdec: disable seeking only for live streams.Paweł Wegner2019-02-06
| | | | | | | | Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
* | avformat/async: fix assertion condition when draining bufferMarton Balint2019-02-04
| | | | | | | | | | | | | | | | Fixes some random assertion failures with ffprobe -show_packets async:samples/ffmpeg-bugs/trac/ticket6132/Samsung_HDR_-_Chasing_the_Light.ts > /dev/null Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/mpegts: cache PID discard valuesMarton Balint2019-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discard_pid can be quite expensive, so let's cache it and recalculate it on every packet start. ffmpeg -y -i samples/MPEG-VOB/sdtv/RAI.ts -c copy -map 0:v:0 -map 0:a:0 -f mpegts /dev/null Before: 1685 decicycles in handle_packet, 523483 runs, 805 skips After: 883 decicycles in handle_packet, 523505 runs, 783 skips Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/rtsp: Check number of streams in sdp_parse_line()Michael Niedermayer2019-01-31
| | | | | | | | | | | | | | | | Fixes: OOM Found-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Michael Hanselmann <public@hansmi.ch> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/hlsenc: add var_stream_map LANGUAGE field string parameterSteven Liu2019-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use a:0,agroup:aud_low,default:Yes,language:CHN a:1,agroup:aud_low,language:ENG a:2,agroup:aud_high,default:YesYes,language:CHN a:3,agroup:aud_high,language:ENG v:0,agroup:aud_low v:1,agroup:aud_high create master m3u8 list. result: EXTM3U EXT-X-VERSION:3 EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,LANGUAGE="CHN",URI="out_0.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,LANGUAGE="ENG",URI="out_1.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,LANGUAGE="CHN",URI="out_2.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,LANGUAGE="ENG",URI="out_3.m3u8" EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low" out_4.m3u8 EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high" out_5.m3u8 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/hlsenc: add var_stream_map DEFAULT field status parameterSteven Liu2019-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use a:0,agroup:aud_low,default:Yes a:1,agroup:aud_low, a:2,agroup:aud_high,default:Yes a:3, agroup:aud_high, v:0,agroup:aud_low v:1,agroup:aud_high create master m3u8 list. result: EXTM3U EXT-X-VERSION:3 EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,URI="out_0.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,URI="out_1.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,URI="out_2.m3u8" EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,URI="out_3.m3u8" EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low" out_4.m3u8 EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high" out_5.m3u8 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/hlsenc: make the EXT-X-MEDIA NAME field by stream id.Steven Liu2019-01-31
| | | | | | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()Michael Niedermayer2019-01-31
| | | | | | | | | | | | | | | | Fixes: Infinite loop Found-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Michael Hanselmann <public@hansmi.ch> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/flvdec: Try to support some concatenated flv filesMichael Niedermayer2019-01-31
| | | | | | | | | | | | Fixes: discont.flv Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/asf: Remove an unneeded forward declaration.Carl Eugen Hoyos2019-01-30
| |
* | avformat/tee : Pass standards compliance value to slave muxers as wellKarthick J2019-01-30
| |
* | avformat/http: clarify that ffmpeg will attempt to add missing CRLFGyan Doshi2019-01-29
| |
* | avformat/dashenc: Skip writing trailer for MP4 output when in streaming modeKarthick J2019-01-28
| | | | | | | | In streaming mode mp4 trailer is not required for playout.
* | lavf/subviewerdec: Skip leading BOM.Carl Eugen Hoyos2019-01-27
| | | | | | | | Fixes ticket #7661.
* | lavf/cafdec: Do not fail for unknown atoms with negative size.Carl Eugen Hoyos2019-01-27
| | | | | | | | | | | | | | The specification requires the demuxer to only read the data atom up to its given size, this is necessary as atoms are allowed at the end of the file. This patch duplicates the behaviour of the QuickTime player.
* | avcodec: add ARBC decoderPaul B Mahol2019-01-27
| | | | | | | | Thanks Kostya for great help in reversing binary.
* | lavf/supenc: Remove some unneeded casts.Carl Eugen Hoyos2019-01-24
| |