error:
av_freep(&ast->sub_ctx);
- av_freep(&pb);
+ avio_context_free(&pb);
}
return 0;
}
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;
}
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);
ret = (parse_multipart_header(pb, &size, "--", NULL) >= 0) ? AVPROBE_SCORE_MAX : 0;
- av_free(pb);
+ avio_context_free(&pb);
return ret;
}
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;
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)
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);
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
static void finish(void)
{
av_write_trailer(ctx);
- av_free(ctx->pb);
+ avio_context_free(&ctx->pb);
avformat_free_context(ctx);
ctx = NULL;
}
av_freep(&wf->sectors);
av_freep(&pb->opaque);
av_freep(&pb->buffer);
- av_free(pb);
+ avio_context_free(&pb);
}
/*