summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-22
|\ | | | | | | | | | | | | * qatar/master: hls: Avoid reading outside of the allocated array Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Avoid reading outside of the allocated arrayMartin Storsjö2013-11-22
| | | | | | | | | | CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8c929098141ebc94ad3f303521c520bb3dc6d8f6'Michael Niedermayer2013-11-22
|\| | | | | | | | | | | | | * commit '8c929098141ebc94ad3f303521c520bb3dc6d8f6': hls: Check whether the AVIOContext contains a new redirected URL Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Check whether the AVIOContext contains a new redirected URLMartin Storsjö2013-11-22
| | | | | | | | | | | | | | This allows both the main playlist itself as well as the variant playlists to handle redirects combined with relative URLs. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/hls: fixed bug where custom http headers weren't kept for hls streamskowalsky2013-11-07
| | | | | | | | See: https://trac.ffmpeg.org/ticket/3024
* | avformat/hls: do not limit manifest lines to 1024 charsMichael Niedermayer2013-09-21
| | | | | | | | | | | | Fixes Ticket2976 Debuged-by: jaimeMF Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-31
|\| | | | | | | | | | | | | | | | | | | * qatar/master: hls: Call avformat_find_stream_info() on the chained demuxers Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Call avformat_find_stream_info() on the chained demuxersMichael Niedermayer2013-07-30
| | | | | | | | | | | | | | | | | | This allows the chained demuxer (or more precisely, the lavf utility code) to better fill in timestamps on packets from these, especially for cases where one stream is a raw ADTS stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '06205b5efdcf0bc4c5463bfdd02f09b5f79fc4cd'Michael Niedermayer2013-07-30
|\| | | | | | | | | | | | | * commit '06205b5efdcf0bc4c5463bfdd02f09b5f79fc4cd': hls: Free packets when skipping packets when seeking Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Free packets when skipping packets when seekingMartin Storsjö2013-07-29
| | | | | | | | | | | | This fixes memory leaks present since 2b3d041cdc. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c44191039944526dd7eb6e536990b555837961f5'Michael Niedermayer2013-07-30
|\| | | | | | | | | | | | | | | | | | | * commit 'c44191039944526dd7eb6e536990b555837961f5': hls: Store all durations in AV_TIME_BASE Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Store all durations in AV_TIME_BASEMartin Storsjö2013-07-29
| | | | | | | | | | | | | | | | | | Also parse segment durations as floating point, which is allowed since HLS version 3. This is based on a patch by Zhang Rui. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e1d5b244761cf69db655ad7ece1dbf2c13dd4fce'Michael Niedermayer2013-07-30
|\| | | | | | | | | | | | | | | | | | | * commit 'e1d5b244761cf69db655ad7ece1dbf2c13dd4fce': hls: Store first_timestamp in units of AV_TIME_BASE Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Store first_timestamp in units of AV_TIME_BASEMartin Storsjö2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When first_timestamp was stored as-is, its actual time base wasn't known later in the seek function. Additionally, the logic (from 795d9594cfa) for scaling it based on stream_index is flawed - stream_index in the seek function only specifies which stream the seek timestamp refers to, but obviously doesn't say anything about which stream first_timestamp belongs to. In the cases where stream_index was >= 0 and all streams had the same time base, this didn't matter in practice. Seeking taking first_timestamp into account is problematic when one variant is mpegts (with real timestamps) and one variant is raw ADTS (with timestamps only being accumulated packet duration), where the variants start at totally different timestamps. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: hls: Create an AVProgram for each variant Conflicts: libavformat/hls.c See: 23db5418ed2ebaddbbc57a45b81caa6e94724587 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Create an AVProgram for each variantLYF2013-07-29
| | | | | | | | | | | | | | | | | | Without the information, an application may choose audio from one variant and video from another variant, which leads to fetching two variants from the network. This enables av_find_best_stream() to find matching audio and video streams, so that only one variant is fetched. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '9d64f236292ba28018dd9afd2d57f8f944b33f81'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | * commit '9d64f236292ba28018dd9afd2d57f8f944b33f81': hls: Respect the different stream time bases when comparing dts Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Respect the different stream time bases when comparing dtsMichael Niedermayer2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adjust the streams timestamps according to their start timestamp when comparing. This helps getting correctly interleaved packets if one stream lacks timestamps (such as a plain ADTS stream when the other variants are full mpegts) when the others have timestamps that don't start from zero. This probably doesn't work properly if such a stream is temporarily disabled (via the discard flags) and then reenabled, and such streams are hard to correctly sync against the other streams as well - but this works better than before at least. The segment number restriction makes sure all variants advance roughly at the same pace as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c11e33a3d9665dd1fc5dbdecdd03a4860ac6a622'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | * commit 'c11e33a3d9665dd1fc5dbdecdd03a4860ac6a622': hls: Set stream offset before opening a chained demuxer Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Set stream offset before opening a chained demuxerMartin Storsjö2013-07-29
| | | | | | | | | | | | | | This makes sure we don't accidentally check discard flags for the wrong stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'cdd2d73d315ecaf19ff49e64c91923275f1bda68'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | | | * commit 'cdd2d73d315ecaf19ff49e64c91923275f1bda68': hls: Don't check discard flags until the parent demuxer's streams actually exist hls: Copy the time base from the chained demuxer Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Don't check discard flags until the parent demuxer's streams actually existMichael Niedermayer2013-07-29
| | | | | | | | | | | | | | | | If passing the end of one segment while initializing the chained demuxer, the parent demuxer's streams aren't set up yet, so we can't recheck the discard flags. Signed-off-by: Martin Storsjö <martin@martin.st>
| * hls: Copy the time base from the chained demuxerMichael Niedermayer2013-07-29
| | | | | | | | | | | | | | When a variant stream isn't mpegts but e.g. raw adts, the default time base (90k) isn't correct. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'eb33ba04e03d9f36e23fffd442510c824be709c3'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | * commit 'eb33ba04e03d9f36e23fffd442510c824be709c3': hls: Return all packets from a previous variant before moving on to the next one Conflicts: libavformat/hls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Return all packets from a previous variant before moving on to the next oneMartin Storsjö2013-07-29
| | | | | | | | | | | | | | | | | | | | This serves as a safeguard; normally we want to use the dts comparison to interleave packets from all active variants. If that dts comparison for some reason doesn't work as intended, make sure that all packets in all variants for a certain sequence number have been returned before moving on to the next one. Signed-off-by: Martin Storsjö <martin@martin.st>
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-07
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
| * miscellaneous typo fixesDiego Biurrun2012-12-21
| |
* | avformat/hls: avoid floating point arithmeticMichael Niedermayer2013-07-22
| | | | | | | | | | | | Should make things more reproducable across platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hls: parse EXTINF duration as floating-point numberZhang Rui2013-07-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cosmetics: Fix "dont" "wont" "doesnt" typosTimothy Gu2013-06-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: fix timebaseMichael Niedermayer2013-03-07
| | | | | | | | | | | | Fixes Ticket1733 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-03
| | | | | | | | | | | | | | As far as I can tell the code should not change behaviour depending on locale in any of these places. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | hls: do not access pb->opaque for custom IO.Reimar Döffinger2013-02-24
| | | | | | | | | | | | | | | | | | | | | | | | As the name indicates we can't just assume what the "opaque" field contains. This fixes a crash in third-party applications see e.g.: http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2126 This fixes also FFmpeg trac #2293, which is a different third-party application. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | hls: add missing checks for accessing avoption fieldsMichael Niedermayer2013-01-23
| | | | | | | | | | | | Fixes null pointer exception and probably other things Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/hls: broker HTTP optionsMicah Galizia2013-01-23
| | | | | | | | Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* | lavf/hls: whitespace cosmetics after 23db5418.Clément Bœsch2012-11-21
| |
* | hls: create an AVProgram for each variantLYF2012-11-21
| | | | | | | | | | | | | | | | | | | | Without the information, application may choose audio from one variant and video from another variant, which leads to fetch two variants from network. This enables av_find_best_stream() to find matching audio and video streams, so that only one variant is fetched from network. Signed-off-by: LYF <yefei.li@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: fix integer overflowMichael Niedermayer2012-10-19
| | | | | | | | | | Fixes CID717892 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix second use of AVOptions in HLSDuncan Salerno2012-10-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: Disable http seekability probingDuncan Salerno2012-10-05
| | | | | | | | | | | | | | Some HLS servers return 403 when the Range header is present. Disabling http seekability probing prevents the header from being added. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: fix min DTS code, try #2Michael Niedermayer2012-08-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: fix EOF checkMichael Niedermayer2012-08-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: use av_compare_ts() instead of comparing apples to oranges.Michael Niedermayer2012-08-21
| | | | | | | | | | | | Fixes Ticket983 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: Initialize stream_offset before find_stream_info.Michael Niedermayer2012-08-13
| | | | | | | | | | | | find stream info causes reads that may use the offset in their callback Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hls: check that the streams have been initialized before checking their ↵Michael Niedermayer2012-08-13
| | | | | | | | | | | | discard flags. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Drop pointless "format" from container long names swscale: bury one more piece of inline asm under HAVE_INLINE_ASM. wv: K&R formatting cosmetics configure: Add missing descriptions to help output h264_ps: declare array of colorspace strings on its own line. fate: amix: specify f32 sample format for comparison tiny_psnr: support 32-bit float samples eamad/eatgq/eatqi: call special EA IDCT directly eamad: remove use of MpegEncContext mpegvideo: remove unnecessary inclusions of faandct.h af_asyncts: avoid overflow in out_size with large delta values af_asyncts: add first_pts option Conflicts: configure libavcodec/eamad.c libavcodec/h264_ps.c libavformat/crcenc.c libavformat/ffmdec.c libavformat/ffmenc.c libavformat/framecrcenc.c libavformat/md5enc.c libavformat/nutdec.c libavformat/rawenc.c libavformat/yuv4mpeg.c tests/tiny_psnr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (35 commits) h264_idct_10bit: port x86 assembly to cpuflags. x86inc: clip num_args to 7 on x86-32. x86inc: sync to latest version from x264. fft: rename "z" to "zc" to prevent name collision. wv: return meaningful error codes. wv: return AVERROR_EOF on EOF, not EIO. mp3dec: forward errors for av_get_packet(). mp3dec: remove a pointless local variable. mp3dec: remove commented out cruft. lavfi: bump minor to mark stabilizing the ABI. FATE: add tests for yadif. FATE: add a test for delogo video filter. FATE: add a test for amix audio filter. audiogen: allow specifying random seed as a commandline parameter. vc1dec: Override invalid macroblock quantizer vc1: avoid reading beyond the last line in vc1_draw_sprites() vc1dec: check that coded slice positions and interlacing match. vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value configure: Move parts that should not be user-selectable to CONFIG_EXTRA lavf: remove commented out cruft in avformat_find_stream_info() ... Conflicts: Makefile configure libavcodec/vc1dec.c libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264dsp_mmx.c libavfilter/version.h libavformat/mp3dec.c libavformat/utils.c libavformat/wv.c libavutil/x86/x86inc.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Proceed to the next segment at any error codeMartin Storsjö2012-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we returned any error code except AVERROR_EOF to the caller - only if AVERROR_EOF or 0 was returned, we proceeded to the next segment. With some setups of web servers, using Connection: close in https and GnuTLS, we don't get a clean error code at the end of segments. In those cases, just proceed to the next segment. Tested-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | hls: replace probsize=0 by noheader flag removial.Michael Niedermayer2012-07-26
| | | | | | | | | | | | | | | | This fixes h264 timestamps in hls Fixes ticket1572 Tested-by: crtmpserver Signed-off-by: Michael Niedermayer <michaelni@gmx.at>