X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsegment.c;h=81d3f1d9408bca62ceeb00e91f5be84baa43b36d;hb=86be73c7c1a5c789ad971d4ec620edc839d46820;hp=8ec3653b385e66697b80cea8c075afc8ad486d56;hpb=8a8f77e49b1ae871e6c29adbc91d9343c17e45e9;p=ffmpeg diff --git a/libavformat/segment.c b/libavformat/segment.c index 8ec3653b385..81d3f1d9408 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -24,8 +24,6 @@ * @url{http://tools.ietf.org/id/draft-pantos-http-live-streaming} */ -/* #define DEBUG */ - #include #include @@ -113,7 +111,7 @@ typedef struct SegmentContext { int write_header_trailer; /**< Set by a private option. */ char *header_filename; ///< filename to write the output header to - int reset_timestamps; ///< reset timestamps at the begin of each segment + int reset_timestamps; ///< reset timestamps at the beginning of each segment int64_t initial_offset; ///< initial timestamps offset, expressed in microseconds char *reference_stream_specifier; ///< reference stream specifier int reference_stream_index; @@ -571,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) @@ -1054,7 +1052,7 @@ static const AVOption options[] = { { "individual_header_trailer", "write header/trailer to each segment", OFFSET(individual_header_trailer), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, E }, { "write_header_trailer", "write a header to the first segment and a trailer to the last one", OFFSET(write_header_trailer), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, E }, - { "reset_timestamps", "reset timestamps at the begin of each segment", OFFSET(reset_timestamps), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, E }, + { "reset_timestamps", "reset timestamps at the beginning of each segment", OFFSET(reset_timestamps), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, E }, { "initial_offset", "set initial timestamp offset", OFFSET(initial_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E }, { "write_empty_segments", "allow writing empty 'filler' segments", OFFSET(write_empty), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, E }, { NULL },