From 34871beb5eb6bc59f5e58326a214efd88a4c2ccd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 1 Nov 2012 06:34:41 +0100 Subject: matroskadec: do not use avpacket internals --- libavformat/matroskadec.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 26f8707e83..bf67253737 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1137,13 +1137,14 @@ static void matroska_fix_ass_packet(MatroskaDemuxContext *matroska, static int matroska_merge_packets(AVPacket *out, AVPacket *in) { - void *newdata = av_realloc(out->data, out->size+in->size); - if (!newdata) - return AVERROR(ENOMEM); - out->data = newdata; - memcpy(out->data+out->size, in->data, in->size); - out->size += in->size; - av_destruct_packet(in); + int old_size = out->size; + int ret = av_grow_packet(out, in->size); + if (ret < 0) + return ret; + + memcpy(out->data + old_size, in->data, in->size); + + av_free_packet(in); av_free(in); return 0; } -- cgit v1.2.3 From b3fab1f2cd22bfaee95831af57a65f803f03083c Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 29 Oct 2012 16:26:59 +0100 Subject: doc: add apidoc target for doxygen API documentation Documentation includes only the externally visible API of the installed headers. Based on a patch by Anton Khirnov . Signed-off-by: Anton Khirnov --- doc/Makefile | 9 +++++++-- doc/doxy-wrapper.sh | 14 ++++++++++++++ library.mak | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 doc/doxy-wrapper.sh diff --git a/doc/Makefile b/doc/Makefile index 63530342b3..d22de79df5 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) all-$(CONFIG_DOC): documentation +apidoc: doc/doxy/html documentation: $(DOCS) TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) @@ -39,7 +40,10 @@ doc/%.1: TAG = MAN doc/%.1: doc/%.pod $(GENTEXI) $(M)pod2man --section=1 --center=" " --release=" " $< > $@ -$(DOCS): | doc/ +$(DOCS) doc/doxy/html: | doc/ + +doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ install-progs-$(CONFIG_DOC): install-man @@ -54,7 +58,8 @@ uninstall-man: clean:: $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi + $(RM) -r doc/doxy/html -include $(wildcard $(DOCS:%=%.d)) -.PHONY: documentation +.PHONY: apidoc documentation diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh new file mode 100755 index 0000000000..6650e38850 --- /dev/null +++ b/doc/doxy-wrapper.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +SRC_PATH="${1}" +DOXYFILE="${2}" + +shift 2 + +doxygen - <