History

avformat/hlsenc: make fix code style of hls_write_trailer

change vs->avf to oc

Steven Liu committed 7 years ago

Commit 8efc9fc1 parent 2e82b501 file · +8 −8Browse files

Unified · Split

libavformat/hlsenc.c+8−8
@@ -2537,7 +2537,7 @@ static int hls_write_trailer(struct AVFormatContext *s) · 2536 unmodified lines
25372537 vs = &hls->var_streams[i];
25382538 oc = vs->avf;
25392539 vtt_oc = vs->vtt_avf;
2540− old_filename = av_strdup(vs->avf->url);
2540+ old_filename = av_strdup(oc->url);
25412541 use_temp_file = 0;
25422542
25432543 if (!old_filename) {
@@ -2546,9 +2546,9 @@ static int hls_write_trailer(struct AVFormatContext *s) · 2 unmodified lines
25462546 if (hls->key_info_file || hls->encrypt) {
25472547 av_dict_set(&options, "encryption_key", hls->key_string, 0);
25482548 av_dict_set(&options, "encryption_iv", hls->iv_string, 0);
2549− filename = av_asprintf("crypto:%s", vs->avf->url);
2549+ filename = av_asprintf("crypto:%s", oc->url);
25502550 } else {
2551− filename = av_asprintf("%s", vs->avf->url);
2551+ filename = av_asprintf("%s", oc->url);
25522552 }
25532553 if (!filename) {
25542554 av_free(old_filename);
@@ -2559,7 +2559,7 @@ static int hls_write_trailer(struct AVFormatContext *s) · 4 unmodified lines
25592559 int range_length = 0;
25602560 if (!vs->init_range_length) {
25612561 uint8_t *buffer = NULL;
2562− av_write_frame(vs->avf, NULL); /* Flush any buffered data */
2562+ av_write_frame(oc, NULL); /* Flush any buffered data */
25632563 avio_flush(oc->pb);
25642564
25652565 range_length = avio_close_dyn_buf(oc->pb, &buffer);
@@ -2580,7 +2580,7 @@ static int hls_write_trailer(struct AVFormatContext *s) · 14 unmodified lines
25802580 set_http_options(s, &options, hls);
25812581 ret = hlsenc_io_open(s, &vs->out, filename, &options);
25822582 if (ret < 0) {
2583− av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", vs->avf->url);
2583+ av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", oc->url);
25842584 goto failed;
25852585 }
25862586 if (hls->segment_type == SEGMENT_TYPE_FMP4)
@@ -2598,13 +2598,13 @@ static int hls_write_trailer(struct AVFormatContext *s) · 11 unmodified lines
25982598 ff_format_io_close(s, &vs->out);
25992599 ret = hlsenc_io_open(s, &vs->out, filename, &options);
26002600 if (ret < 0) {
2601− av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", vs->avf->url);
2601+ av_log(s, AV_LOG_ERROR, "Failed to open file '%s'\n", oc->url);
26022602 goto failed;
26032603 }
26042604 reflush_dynbuf(vs, &range_length);
26052605 ret = hlsenc_io_close(s, &vs->out, filename);
26062606 if (ret < 0)
2607− av_log(s, AV_LOG_WARNING, "Failed to upload file '%s' at the end.\n", vs->avf->url);
2607+ av_log(s, AV_LOG_WARNING, "Failed to upload file '%s' at the end.\n", oc->url);
26082608 }
26092609 av_free(vs->temp_buffer);
26102610
@@ -2620,7 +2620,7 @@ failed: · 9 unmodified lines
26202620 if (use_temp_file && !(hls->flags & HLS_SINGLE_FILE)) {
26212621 hls_rename_temp_file(s, oc);
26222622 av_free(old_filename);
2623− old_filename = av_strdup(vs->avf->url);
2623+ old_filename = av_strdup(oc->url);
26242624
26252625 if (!old_filename) {
26262626 return AVERROR(ENOMEM);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t