[FFmpeg-cvslog] avformat/hlsenc: reindent hlsenc code
Steven Liu
git at videolan.org
Thu Nov 2 16:31:00 EET 2017
ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Thu Nov 2 22:30:06 2017 +0800| [c7360512c27df260550d6fec36039769e6a996ea] | committer: Steven Liu
avformat/hlsenc: reindent hlsenc code
Signed-off-by: Steven Liu <lq at onvideo.cn>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7360512c27df260550d6fec36039769e6a996ea
---
libavformat/hlsenc.c | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 6d573db094..5ea9d216a4 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1444,36 +1444,36 @@ static int hls_write_header(AVFormatContext *s)
}
if (hls->segment_type == SEGMENT_TYPE_FMP4) {
- if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
- hls->base_output_dirname = av_malloc(fmp4_init_filename_len);
- if (!hls->base_output_dirname) {
- ret = AVERROR(ENOMEM);
- goto fail;
- }
- av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
- } else {
- if (basename_size > 0) {
- hls->base_output_dirname = av_malloc(basename_size);
+ if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
+ hls->base_output_dirname = av_malloc(fmp4_init_filename_len);
+ if (!hls->base_output_dirname) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
+ av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
} else {
- hls->base_output_dirname = av_malloc(strlen(hls->fmp4_init_filename));
- }
- if (!hls->base_output_dirname) {
- ret = AVERROR(ENOMEM);
- goto fail;
- }
+ if (basename_size > 0) {
+ hls->base_output_dirname = av_malloc(basename_size);
+ } else {
+ hls->base_output_dirname = av_malloc(strlen(hls->fmp4_init_filename));
+ }
+ if (!hls->base_output_dirname) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
- if (basename_size > 0) {
- av_strlcpy(hls->base_output_dirname, s->filename, basename_size);
- p = strrchr(hls->base_output_dirname, '/');
- }
- if (p) {
- *(p + 1) = '\0';
- av_strlcat(hls->base_output_dirname, hls->fmp4_init_filename, basename_size);
- } else {
- av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
+ if (basename_size > 0) {
+ av_strlcpy(hls->base_output_dirname, s->filename, basename_size);
+ p = strrchr(hls->base_output_dirname, '/');
+ }
+ if (p) {
+ *(p + 1) = '\0';
+ av_strlcat(hls->base_output_dirname, hls->fmp4_init_filename, basename_size);
+ } else {
+ av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
+ }
}
}
- }
if (!hls->use_localtime) {
ret = sls_flag_check_duration_size_index(hls);
More information about the ffmpeg-cvslog
mailing list