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:
Mika Raento 2014-10-17 19:28:47 +03:00 committed by Michael Niedermayer
parent 0b0d47e4b2
commit 75c8d7c2b4
2 changed files with 7 additions and 4 deletions

View File

@ -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++) {

View File

@ -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++) {