On Mon, May 28, 2018 at 08:18:53PM +0200, Stephan Holljes wrote: > Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> > --- > configreader.c | 235 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > configreader.h | 47 ++++++++++++ > 2 files changed, 282 insertions(+) > create mode 100644 configreader.c > create mode 100644 configreader.h > > diff --git a/configreader.c b/configreader.c > new file mode 100644 > index 0000000..3580fc5 > --- /dev/null > +++ b/configreader.c > @@ -0,0 +1,235 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +#include "configreader.h" > +#include "httpd.h" > +#include <stdio.h> > +#include <string.h> > +#include <lua.h> > +#include <lauxlib.h> > +#include <lualib.h> > + > +#include <libavutil/mem.h> > +#include <libavutil/error.h> > + > +const char *stream_format_names[] = { "mkv" }; > + > +static struct HTTPDConfig *parsed_configs = NULL; > + > +void stream_free(struct StreamConfig *stream) > +{ > + if (stream->stream_name) > + av_free(stream->stream_name); > + if (stream->input_uri) > + av_free(stream->input_uri); > + if (stream->formats) > + av_free(stream->formats);
the null checks arent needed also av_freep() may be better as it does not leave the freed pointer but replaces with with NULL [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel