diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-12 22:29:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-12 22:29:47 +0200 |
commit | 5afe1233c591d661543d89b8bde613bf8bae75b0 (patch) | |
tree | 7e7acd44df147b76296d96ed20758beff84dbdbd | |
parent | 941aaa39e8cd78ba4d16dfcec767290aec9a0136 (diff) | |
parent | 8bef43388132b53f59a6e90add18900a3bb4cc60 (diff) | |
download | ffmpeg-5afe1233c591d661543d89b8bde613bf8bae75b0.tar.gz |
Merge commit '8bef43388132b53f59a6e90add18900a3bb4cc60'
* commit '8bef43388132b53f59a6e90add18900a3bb4cc60':
smoothstreamingenc: Simplify code by removing a redundant variable
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/smoothstreamingenc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index cc5433018c..9f6d38fe3f 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -516,7 +516,7 @@ static int ism_flush(AVFormatContext *s, int final) for (i = 0; i < s->nb_streams; i++) { OutputStream *os = &c->streams[i]; char filename[1024], target_filename[1024], header_filename[1024]; - int64_t start_pos = os->tail_pos, size; + int64_t size; int64_t start_ts, duration, moof_size; if (!os->packets_written) continue; @@ -534,14 +534,15 @@ static int ism_flush(AVFormatContext *s, int final) ffurl_close(os->out); os->out = NULL; - size = os->tail_pos - start_pos; + size = os->tail_pos - os->cur_start_pos; if ((ret = parse_fragment(s, filename, &start_ts, &duration, &moof_size, size)) < 0) break; snprintf(header_filename, sizeof(header_filename), "%s/FragmentInfo(%s=%"PRIu64")", os->dirname, os->stream_type_tag, start_ts); snprintf(target_filename, sizeof(target_filename), "%s/Fragments(%s=%"PRIu64")", os->dirname, os->stream_type_tag, start_ts); copy_moof(s, filename, header_filename, moof_size); rename(filename, target_filename); - add_fragment(os, target_filename, header_filename, start_ts, duration, start_pos, size); + add_fragment(os, target_filename, header_filename, start_ts, duration, + os->cur_start_pos, size); } if (c->window_size || (final && c->remove_at_exit)) { |