summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
Commit message (Collapse)AuthorAge
...
* | 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>
* | hls: call avformat_find_stream_info()Michael Niedermayer2012-07-25
| | | | | | | | | | | | This is needed to correctly demux h264 in ts Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cosmetics: various spelling fixesLou Logan2012-07-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/applehttp: add log message in case of applehttp_read_header() failureStefano Sabatini2012-06-29
| | | | | | | | Improve error reporting.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libspeexenc: add supported sample rates and channel layouts. Replace usleep() calls with av_usleep() lavu: add av_usleep() function utvideo: mark interlaced frames as such utvideo: Fix interlaced prediction for RGB utvideo. cosmetics: do not use full path for local headers lavu/file: include unistd.h only when available configure: check for unistd.h log: include unistd.h only when needed lavf: include libavutil/time.h instead of redeclaring av_gettime() Conflicts: configure doc/APIchanges ffmpeg.c ffplay.c libavcodec/utvideo.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace usleep() calls with av_usleep()Mans Rullgard2012-06-22
| | | | | | | | | | | | | | This reduces the dependency on unistd.h which is not available on all systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (36 commits) adpcmenc: Use correct frame_size for Yamaha ADPCM. avcodec: add ff_samples_to_time_base() convenience function to internal.h adx parser: set duration mlp parser: set duration instead of frame_size gsm parser: set duration mpegaudio parser: set duration instead of frame_size (e)ac3 parser: set duration instead of frame_size flac parser: set duration instead of frame_size avcodec: add duration field to AVCodecParserContext avutil: add av_rescale_q_rnd() to allow different rounding pnmdec: remove useless .pix_fmts libmp3lame: support float and s32 sample formats libmp3lame: renaming, rearrangement, alignment, and comments libmp3lame: use the LAME default bit rate libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing libmp3lame: cosmetics: remove some pointless comments libmp3lame: convert some debugging code to av_dlog() libmp3lame: remove outdated comment. libmp3lame: do not set coded_frame->key_frame. libmp3lame: improve error handling in MP3lame_encode_init() ... Conflicts: doc/APIchanges libavcodec/libmp3lame.c libavcodec/pcxenc.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/sgienc.c libavcodec/utils.c libavformat/hls.c libavutil/avutil.h libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hls: Reset the AVIOContext when seekingMartin Storsjö2012-02-20
| | | | | | | | | | | | | | | | This avoids reading any old data in the AVIOContext buffer after the seek, and indicates to the mpegts demuxer that we've seeked, avoiding continuity check errors. Signed-off-by: Martin Storsjö <martin@martin.st>
| * applehttp: Do seeking within segments, tooPanagiotis H.M. Issaris2012-02-19
| | | | | | | | | | | | | | | | | | | | | | Enhance seeking by demuxing until the requested timestamp is reached within the segment selected by the seek code using the playlist info. Some mpegts streams don't have dts set for all packets though, this seeking method doesn't work well for that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) CDXL demuxer and decoder hls: Re-add legacy applehttp name to preserve interface compatibility. hlsproto: Rename the functions and context hlsproto: Encourage users to try the hls demuxer instead of the proto doc: Move the hls protocol section into the right place libavformat: Rename the applehttp protocol to hls hls: Rename the functions and context libavformat: Rename the applehttp demuxer to hls rtpdec: Support H263 in RFC 2190 format rv30: check block type validity ttadec: CRC checking movenc: Support muxing VC1 avconv: Don't split out inline sequence headers when stream copying VC1 rv34: handle size changes during frame multithreading rv40: prevent undefined signed overflow in rv40_loop_filter() rv34: use AVERROR return values in ff_rv34_decode_frame() rv34: use uint16_t for RV34DecContext.deblock_coefs librtmp: Add "lib" prefix to librtmp URLProtocol declarations. movenc: Use defines instead of hardcoded numbers for RTCP types smjpegdec: implement seeking ... Conflicts: Changelog doc/general.texi libavcodec/avcodec.h libavcodec/rv30.c libavcodec/tta.c libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* hls: Re-add legacy applehttp name to preserve interface compatibility.Alex Converse2012-02-14
|