Mika Raento
58e0402e02
segment: don't access outside seg->frames array
...
Fixes wrong number of segments output and undefined memory access.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
4b1f5e5090
cosmetics: Write NULL pointer inequality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
66ae994c54
avformat/segment: re-interleave packets if needed
...
Fixes part of Ticket 3797
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
351b22caae
avformat/mux: support re-interleaving packets in ff_write_chained()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Stefano Sabatini
44071b0d25
lavf/segment: sanitize segment end time in case last packet do not have a defined duration
...
In particular, avoids to set segments with duration set to 0
(e.g. segment with a single reference frame for which duration is
undefined).
10 years ago
Stefano Sabatini
713157484a
lavf/segment: do not allow to create segments with no key-frames
...
Fix trac ticket #3749 .
10 years ago
Stefano Sabatini
526bd7bdfa
lavf/segment: set segment end time when the first packet arrives
...
Avoid negative durations in case there is a single packet in the current
segment, since in that case the end time is still set to the previous
segment end time.
10 years ago
Stefano Sabatini
3d38c99041
lavf/segment: fix weird indent
10 years ago
Stefano Sabatini
b6a8c5245f
lavf/segment: show incoming packet duration in debug message
10 years ago
Stefano Sabatini
5acad50056
lavf/segment: only use reference frames for computing the segment end time
...
This avoids a systematic overestimate of the segments duration when there
are several streams.
Fix trac ticket #3724 .
10 years ago
Simon Thelen
fa6716c66d
libavformat/segment: change segment_list_size behavior to match hls_list_size behavior.
...
Make the segment muxer keep segment_list_size segments instead of
segment_list_size + 1 segments. This patch also changes the
documentation for segment_list_size to reduce possible confusion over
how many segments are kept.
this allows the segment list to
be limited to containing only one segment which used to be impossible
because a segment_list_size of 0 kept all the segments and a
segment_list_size of 1 kept 2 segments.
Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7125b6ca90
avformat/segment: remove gettimeofday() use, remove sys/time.h
...
It causes portability issues, and would need ifdef hell if its kept
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b8d017adba
avformat/segment: simplify localtime* use
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Deti fliegl
8cda23f341
avformat/segment: Support cutting at clocktime
...
Signed-off-by: Deti fliegl <fliegl@baycom.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1394e0a9e0
avformat/segment: Use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
87a3ea3192
segment: Report the current media sequence
...
Useful for debugging mostly.
11 years ago
Enrique Arizón Benito
5c08ae4f37
segment: Add an option to prepend a string to the list entries
...
Useful to generate lists with absolute urls.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Willy Aubry
65c95de213
avformat/HLS: modified EXT-X-MEDIA-SEQUENCE header in order to follow the HLS standard
...
When using the wrap option the EXT-X-MEDIA-SEQUENCE header of the playlist file was reset instead of being incremented.
It is now incremented by one for every media URI removed from the playlist file as the standard states.
Signed-off-by: Willy Aubry <waubry@viotech.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
f57baf743f
lavf/segment: drop pointless variable oc from seg_write_packet()
11 years ago
Stefano Sabatini
169065fbfb
lavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()
...
In particular, avoid to leave around the seg->avf pointer to freed
structure, and fix crash with:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -f segment foo-%d.ts
11 years ago
Stefano Sabatini
8937af7b6f
lavf/segment: increase logging level for message with segment start information
...
Help debugging.
11 years ago
Stefano Sabatini
c0f2e07135
lavf/segment: add a few log messages when avio_open2() fails
11 years ago
Stefano Sabatini
5e278c19c7
lavf/segment: add segment_list_entry_prefix option
...
This option allows to add a prefix to the segment list entry filenames.
Also set by default the list entry filenames to the corresponding
segment basename, consistent with the HLS muxer.
Based on an idea by Steven Liu <lingjiujianke@gmail.com>.
11 years ago
Stefano Sabatini
1120fd7852
lavf/segment: simplify logic and fix !=0 check on segment_end return value
...
A successfull return value can be > 0.
11 years ago
Billy Shambrook
67e507e10e
lavf/segment: log segments as they end to AV_LOG_VERBOSE
...
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Stefano Sabatini
3b9f8e7cd9
lavf/segment: simplify segment_count update
...
Now segment_count mark the segment_count of the current segment.
11 years ago
Thilo Borgmann
d814a839ac
Reinstate proper FFmpeg license for all files.
11 years ago
Stefano Sabatini
71a2e5245c
lavf/segment: use AV_OPT_TIME_DURATION for time_delta
...
Simplify.
12 years ago
Stefano Sabatini
459dc81a64
lavf/segment: reindent after last commit
12 years ago
Stefano Sabatini
19ea08a11a
lavf/segment: add initial_offset option
...
Should address trac ticket #2224 .
12 years ago
Anton Khirnov
cf679b9476
hls, segment: fix splitting for audio-only streams.
...
CC:libav-stable@libav.org
12 years ago
Michael Niedermayer
0e02a5193f
segment: copy metadata
...
Fixes Ticket2230
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
d95143ec82
lavf/segment: add support to ffconcat segment list
12 years ago
Stefano Sabatini
b3d2c6f8b9
lavf/segment: fix DTS inconsistencies with -reset_timestamps
...
The DTS needs to be resynched against the segment start PTS, or the
resulting DTS may result < PTS.
Reported-by: Owen Jones <riots6@gmail.com>
See thread:
Subject: [FFmpeg-user] pts/dts error using reset_timestamps while splitting a DVD
Date: Sat, 19 Jan 2013 08:58:27 +0000
12 years ago
Stefano Sabatini
a12787960e
lavf/segment: extend PTS debugging log with -reset_timestamps
12 years ago
Carl Eugen Hoyos
90020d7f4b
lavf/segment: use correct spelling and value for EXT-X-ALLOW-CACHE tag
...
Replace wrong "EXT-X-ALLOWCACHE" with "EXT-X-ALLOW-CACHE", and value 1/0
with YES/NO, as per spec.
Fix trac ticket #2228 .
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years ago
Stefano Sabatini
e319725717
lavf/segment: exit immediately in case of invalid stream specifier
...
Avoid duplicated confusing error message, and propagate error code from
the failing avformat_match_stream_specifier() call.
12 years ago
Stefano Sabatini
bb539eb13a
lavf/segment: avoid failure in case -flags +live and -segment_times/frames are specified
...
The conflict does not apply any longer, since the M3U8 segment target
duration is re-computed every time a new segment is added to the list.
12 years ago
Stefano Sabatini
f4e4e5b841
lavf/segment: drop now pointless segment_list_close() function
12 years ago
Stefano Sabatini
ca68acd7ac
lavf/segment: mark #EXT-X-ENDLIST in M3U8 only at the end of stream
...
Should fix immediate playback termination.
In particular, should fix trac ticket #2172 .
12 years ago
Stefano Sabatini
30a40d4a55
lavf/segment: provide link to HTML M3U8 draft, also fix mentioned version in docs
12 years ago
Stefano Sabatini
d00df260ca
lavf/segment: do not auto-select a video stream with attached_pic disposition
...
In particular, fix trac ticket #2138 .
12 years ago
Stefano Sabatini
bbce913edf
lavf/segment: move reference stream selection code to a dedicated function
12 years ago
Stefano Sabatini
1de369a632
lavf/segment: remove now unused field list_max_segment_time
12 years ago
Stefano Sabatini
d4890c1068
lavf/segment: add support to segment list file entries sliding window listing
...
In particular, should fix trac ticket #1842 .
12 years ago
Stefano Sabatini
6b7d9d5153
lavf/segment: add SegmentListEntry and use it
...
This patch is propedeutic to the incoming patch which adds
support to sliding window segment listing.
12 years ago
Stefano Sabatini
0156dd6530
lavf/segment: add segment_frames option
...
This is meant to address trac ticket #1483 .
12 years ago
Stefano Sabatini
7a8face9fb
lavf/segment: add reference_stream option
12 years ago
Stefano Sabatini
ecebf6fc82
lavf/segment: provide more debug feedback when a new segment starts
12 years ago
Stefano Sabatini
df5f9496e6
lavf/segment: add missing flags to segmenter option constants
12 years ago