avformat/hlsenc: fix code style
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
07b4bf5f11
commit
fe77cad3a4
@ -244,7 +244,8 @@ typedef struct HLSContext {
|
|||||||
} HLSContext;
|
} HLSContext;
|
||||||
|
|
||||||
static int hlsenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,
|
static int hlsenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,
|
||||||
AVDictionary **options) {
|
AVDictionary **options)
|
||||||
|
{
|
||||||
HLSContext *hls = s->priv_data;
|
HLSContext *hls = s->priv_data;
|
||||||
int http_base_proto = filename ? ff_is_http_proto(filename) : 0;
|
int http_base_proto = filename ? ff_is_http_proto(filename) : 0;
|
||||||
int err = AVERROR_MUXER_NOT_FOUND;
|
int err = AVERROR_MUXER_NOT_FOUND;
|
||||||
@ -263,7 +264,8 @@ static int hlsenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename) {
|
static int hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename)
|
||||||
|
{
|
||||||
HLSContext *hls = s->priv_data;
|
HLSContext *hls = s->priv_data;
|
||||||
int http_base_proto = filename ? ff_is_http_proto(filename) : 0;
|
int http_base_proto = filename ? ff_is_http_proto(filename) : 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -302,7 +304,8 @@ static void set_http_options(AVFormatContext *s, AVDictionary **options, HLSCont
|
|||||||
av_dict_set(options, "headers", c->headers, 0);
|
av_dict_set(options, "headers", c->headers, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write_codec_attr(AVStream *st, VariantStream *vs) {
|
static void write_codec_attr(AVStream *st, VariantStream *vs)
|
||||||
|
{
|
||||||
int codec_strlen = strlen(vs->codec_attr);
|
int codec_strlen = strlen(vs->codec_attr);
|
||||||
char attr[32];
|
char attr[32];
|
||||||
|
|
||||||
@ -475,7 +478,8 @@ static void reflush_dynbuf(VariantStream *vs, int *range_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
|
static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
|
||||||
VariantStream *vs) {
|
VariantStream *vs)
|
||||||
|
{
|
||||||
|
|
||||||
HLSSegment *segment, *previous_segment = NULL;
|
HLSSegment *segment, *previous_segment = NULL;
|
||||||
float playlist_duration = 0.0f;
|
float playlist_duration = 0.0f;
|
||||||
@ -1249,7 +1253,8 @@ static const char* get_relative_url(const char *master_url, const char *media_ur
|
|||||||
return media_url + base_len;
|
return media_url + base_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t get_stream_bit_rate(AVStream *stream) {
|
static int64_t get_stream_bit_rate(AVStream *stream)
|
||||||
|
{
|
||||||
AVCPBProperties *props = (AVCPBProperties*)av_stream_get_side_data(
|
AVCPBProperties *props = (AVCPBProperties*)av_stream_get_side_data(
|
||||||
stream,
|
stream,
|
||||||
AV_PKT_DATA_CPB_PROPERTIES,
|
AV_PKT_DATA_CPB_PROPERTIES,
|
||||||
@ -2091,7 +2096,8 @@ static int parse_cc_stream_mapstring(AVFormatContext *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int update_variant_stream_info(AVFormatContext *s) {
|
static int update_variant_stream_info(AVFormatContext *s)
|
||||||
|
{
|
||||||
HLSContext *hls = s->priv_data;
|
HLSContext *hls = s->priv_data;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -2136,7 +2142,8 @@ static int update_variant_stream_info(AVFormatContext *s) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int update_master_pl_info(AVFormatContext *s) {
|
static int update_master_pl_info(AVFormatContext *s)
|
||||||
|
{
|
||||||
HLSContext *hls = s->priv_data;
|
HLSContext *hls = s->priv_data;
|
||||||
const char *dir;
|
const char *dir;
|
||||||
char *fn1= NULL, *fn2 = NULL;
|
char *fn1= NULL, *fn2 = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user