Browse Source

Use the new AVIOContext destructor.

(cherry picked from commit 6f554521af)
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n3.4
Anton Khirnov James Almer 7 years ago
parent
commit
78a7af823b
10 changed files with 11 additions and 11 deletions
  1. +1
    -1
      libavformat/avidec.c
  2. +2
    -2
      libavformat/flac_picture.c
  3. +1
    -1
      libavformat/hdsenc.c
  4. +1
    -1
      libavformat/mpjpegdec.c
  5. +1
    -1
      libavformat/rdt.c
  6. +1
    -1
      libavformat/segment.c
  7. +1
    -1
      libavformat/smoothstreamingenc.c
  8. +1
    -1
      libavformat/swfdec.c
  9. +1
    -1
      libavformat/tests/movenc.c
  10. +1
    -1
      libavformat/wtvdec.c

+ 1
- 1
libavformat/avidec.c View File

@@ -1124,7 +1124,7 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)

error:
av_freep(&ast->sub_ctx);
av_freep(&pb);
avio_context_free(&pb);
}
return 0;
}


+ 2
- 2
libavformat/flac_picture.c View File

@@ -140,14 +140,14 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
if (desc)
av_dict_set(&st->metadata, "title", desc, AV_DICT_DONT_STRDUP_VAL);

av_freep(&pb);
avio_context_free(&pb);

return 0;

fail:
av_buffer_unref(&data);
av_freep(&desc);
av_freep(&pb);
avio_context_free(&pb);

return ret;
}

+ 1
- 1
libavformat/hdsenc.c View File

@@ -145,7 +145,7 @@ static void hds_free(AVFormatContext *s)
if (os->ctx && os->ctx_inited)
av_write_trailer(os->ctx);
if (os->ctx)
av_freep(&os->ctx->pb);
avio_context_free(&os->ctx->pb);
if (os->ctx)
avformat_free_context(os->ctx);
av_freep(&os->metadata);


+ 1
- 1
libavformat/mpjpegdec.c View File

@@ -126,7 +126,7 @@ static int mpjpeg_read_probe(AVProbeData *p)

ret = (parse_multipart_header(pb, &size, "--", NULL) >= 0) ? AVPROBE_SCORE_MAX : 0;

av_free(pb);
avio_context_free(&pb);

return ret;
}


+ 1
- 1
libavformat/rdt.c View File

@@ -323,7 +323,7 @@ get_cache:
st, rdt->rmst[st->index], pkt);
if (rdt->audio_pkt_cnt == 0 &&
st->codecpar->codec_id == AV_CODEC_ID_AAC)
av_freep(&rdt->rmctx->pb);
avio_context_free(&rdt->rmctx->pb);
}
pkt->stream_index = st->index;
pkt->pts = *timestamp;


+ 1
- 1
libavformat/segment.c View File

@@ -569,7 +569,7 @@ static int open_null_ctx(AVIOContext **ctx)
static void close_null_ctxp(AVIOContext **pb)
{
av_freep(&(*pb)->buffer);
av_freep(pb);
avio_context_free(pb);
}

static int select_reference_stream(AVFormatContext *s)


+ 1
- 1
libavformat/smoothstreamingenc.c View File

@@ -182,7 +182,7 @@ static void ism_free(AVFormatContext *s)
if (os->ctx && os->ctx_inited)
av_write_trailer(os->ctx);
if (os->ctx && os->ctx->pb)
av_freep(&os->ctx->pb);
avio_context_free(&os->ctx->pb);
if (os->ctx)
avformat_free_context(os->ctx);
av_freep(&os->private_str);


+ 1
- 1
libavformat/swfdec.c View File

@@ -531,7 +531,7 @@ static av_cold int swf_read_close(AVFormatContext *avctx)
inflateEnd(&s->zstream);
av_freep(&s->zbuf_in);
av_freep(&s->zbuf_out);
av_freep(&s->zpb);
avio_context_free(&s->zpb);
return 0;
}
#endif


+ 1
- 1
libavformat/tests/movenc.c View File

@@ -344,7 +344,7 @@ static void signal_init_ts(void)
static void finish(void)
{
av_write_trailer(ctx);
av_free(ctx->pb);
avio_context_free(&ctx->pb);
avformat_free_context(ctx);
ctx = NULL;
}


+ 1
- 1
libavformat/wtvdec.c View File

@@ -305,7 +305,7 @@ static void wtvfile_close(AVIOContext *pb)
av_freep(&wf->sectors);
av_freep(&pb->opaque);
av_freep(&pb->buffer);
av_free(pb);
avio_context_free(&pb);
}

/*


Loading…
Cancel
Save