ffmpeg | branch: master | Steven Liu <l...@chinaffmpeg.org> | Tue Dec 12 11:50:23 2017 +0800| [0e5260226a72fc9da2967ded99624f5dfb1ed135] | committer: Steven Liu
avformat/hlsenc: reindent after previous commits > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e5260226a72fc9da2967ded99624f5dfb1ed135 --- libavformat/hlsenc.c | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index dd09739651..fdf614bdd1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1646,40 +1646,40 @@ static int hls_write_header(AVFormatContext *s) for (i = 0; i < hls->nb_varstreams; i++) { vs = &hls->var_streams[i]; - av_dict_copy(&options, hls->format_options, 0); - ret = avformat_write_header(vs->avf, &options); - if (av_dict_count(options)) { - av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are not recognized\n", hls->format_options_str); - ret = AVERROR(EINVAL); + av_dict_copy(&options, hls->format_options, 0); + ret = avformat_write_header(vs->avf, &options); + if (av_dict_count(options)) { + av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are not recognized\n", hls->format_options_str); + ret = AVERROR(EINVAL); + av_dict_free(&options); + goto fail; + } av_dict_free(&options); - goto fail; - } - av_dict_free(&options); - //av_assert0(s->nb_streams == hls->avf->nb_streams); - for (j = 0; j < vs->nb_streams; j++) { - AVStream *inner_st; - AVStream *outer_st = vs->streams[j]; - - if (hls->max_seg_size > 0) { - if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && - (outer_st->codecpar->bit_rate > hls->max_seg_size)) { - av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger than hls_segment_size, " - "(%"PRId64 " > %"PRId64 "), the result maybe not be what you want.", - outer_st->codecpar->bit_rate, hls->max_seg_size); + //av_assert0(s->nb_streams == hls->avf->nb_streams); + for (j = 0; j < vs->nb_streams; j++) { + AVStream *inner_st; + AVStream *outer_st = vs->streams[j]; + + if (hls->max_seg_size > 0) { + if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && + (outer_st->codecpar->bit_rate > hls->max_seg_size)) { + av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger than hls_segment_size, " + "(%"PRId64 " > %"PRId64 "), the result maybe not be what you want.", + outer_st->codecpar->bit_rate, hls->max_seg_size); + } } - } - if (outer_st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) - inner_st = vs->avf->streams[j]; - else if (vs->vtt_avf) - inner_st = vs->vtt_avf->streams[0]; - else { - /* We have a subtitle stream, when the user does not want one */ - inner_st = NULL; - continue; + if (outer_st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) + inner_st = vs->avf->streams[j]; + else if (vs->vtt_avf) + inner_st = vs->vtt_avf->streams[0]; + else { + /* We have a subtitle stream, when the user does not want one */ + inner_st = NULL; + continue; + } + avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den); } - avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den); - } } fail: _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog