mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-22 14:57:05 +00:00
avformat/smoothstreaming: Don't write trailer of subcontext
Nothing written in avformat_write_trailer() for the submuxers will be output anyway because the AVIOContexts used for actual output have been closed before the call. Writing the trailer of the subcontext has probably only been done in order to free the memory allocated by the submuxer. And this job has been taken over by the deinit functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
b6fbbe08c3
commit
76a413d961
@ -49,7 +49,6 @@ typedef struct Fragment {
|
|||||||
|
|
||||||
typedef struct OutputStream {
|
typedef struct OutputStream {
|
||||||
AVFormatContext *ctx;
|
AVFormatContext *ctx;
|
||||||
int ctx_inited;
|
|
||||||
char dirname[1024];
|
char dirname[1024];
|
||||||
uint8_t iobuf[32768];
|
uint8_t iobuf[32768];
|
||||||
URLContext *out; // Current output stream where all output is written
|
URLContext *out; // Current output stream where all output is written
|
||||||
@ -173,8 +172,6 @@ static void ism_free(AVFormatContext *s)
|
|||||||
ffurl_closep(&os->out);
|
ffurl_closep(&os->out);
|
||||||
ffurl_closep(&os->out2);
|
ffurl_closep(&os->out2);
|
||||||
ffurl_closep(&os->tail_out);
|
ffurl_closep(&os->tail_out);
|
||||||
if (os->ctx && os->ctx_inited)
|
|
||||||
av_write_trailer(os->ctx);
|
|
||||||
if (os->ctx && os->ctx->pb)
|
if (os->ctx && os->ctx->pb)
|
||||||
avio_context_free(&os->ctx->pb);
|
avio_context_free(&os->ctx->pb);
|
||||||
avformat_free_context(os->ctx);
|
avformat_free_context(os->ctx);
|
||||||
@ -357,7 +354,6 @@ static int ism_write_header(AVFormatContext *s)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
os->ctx_inited = 1;
|
|
||||||
avio_flush(ctx->pb);
|
avio_flush(ctx->pb);
|
||||||
s->streams[i]->time_base = st->time_base;
|
s->streams[i]->time_base = st->time_base;
|
||||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||||
|
Loading…
Reference in New Issue
Block a user