mirror of https://git.ffmpeg.org/ffmpeg.git
hlsenc.c, segment.c: propagate defaults to mpegts
This fixes the abnormally high ts overhead in the files produced by the HLS and segments muxers. See https://trac.ffmpeg.org/ticket/2857 . For example makes it much more likely that it can produces streams that fit under the 64kb App store limit. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0b0d47e4b2
commit
75c8d7c2b4
|
@ -85,14 +85,16 @@ static int hls_mux_init(AVFormatContext *s)
|
|||
{
|
||||
HLSContext *hls = s->priv_data;
|
||||
AVFormatContext *oc;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
hls->avf = oc = avformat_alloc_context();
|
||||
if (!oc)
|
||||
return AVERROR(ENOMEM);
|
||||
ret = avformat_alloc_output_context2(&hls->avf, hls->oformat, NULL, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
oc = hls->avf;
|
||||
|
||||
oc->oformat = hls->oformat;
|
||||
oc->interrupt_callback = s->interrupt_callback;
|
||||
oc->max_delay = s->max_delay;
|
||||
av_dict_copy(&oc->metadata, s->metadata, 0);
|
||||
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
|
|
|
@ -143,6 +143,7 @@ static int segment_mux_init(AVFormatContext *s)
|
|||
oc = seg->avf;
|
||||
|
||||
oc->interrupt_callback = s->interrupt_callback;
|
||||
oc->max_delay = s->max_delay;
|
||||
av_dict_copy(&oc->metadata, s->metadata, 0);
|
||||
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
|
|
Loading…
Reference in New Issue