Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…x071936

Improve Git hash for configure.in
  • Loading branch information
sackmotion committed Oct 22, 2011
1 parent 58627b0 commit 734155f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Features
* Added a macro MOTION_LOG , no need to add __FUNCTION__ anymore. (Angel Carpintero)
* Added EXIF feature for jpeg images , http://www.lavrsen.dk/foswiki/bin/view/Motion/ExifTaggingPatch (Wim Lewis)
* Improve detection of av_register_protocol() for ffmpeg (Angel Carpintero).


Bugfixes
* Avoid segfault detecting strerror_r() version GNU or SUSv3. (Angel Carpintero)
Expand All @@ -61,6 +61,8 @@ Bugfixes
* No PQfinish() (Angel Carpintero)
* Input for webcams has to be set to -1
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x01x21x162309
* Added a conditional check for avformat_alloc_context , av_avformat_alloc_context to fix
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936 (Angel Carpintero)

3.2.12 Summary of Changes

Expand Down
2 changes: 2 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ Angel Carpintero
* Fixed FFV1 codec encode with ffmpeg.
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x13x032553
* No PQfinish().
* Added a conditional check for avformat_alloc_context , av_avformat_alloc_context to fix
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936

Jared D
* Change bayer2rgb24() to fix a problem with sn9c102 driver
Expand Down
6 changes: 6 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

Expand All @@ -107,3 +110,6 @@

/* Define to empty if `const' does not conform to ANSI C. */
#undef const

/* Define to 1 if you have avformat_alloc_context support */
#undef have_avformat_alloc_context
34 changes: 25 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.67 for motion Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee.
# Generated by GNU Autoconf 2.67 for motion Git-58627b05aad3f978a97b36ac05f9917015030602.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Expand Down Expand Up @@ -549,8 +549,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='motion'
PACKAGE_TARNAME='motion'
PACKAGE_VERSION='Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee'
PACKAGE_STRING='motion Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee'
PACKAGE_VERSION='Git-58627b05aad3f978a97b36ac05f9917015030602'
PACKAGE_STRING='motion Git-58627b05aad3f978a97b36ac05f9917015030602'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1216,7 +1216,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures motion Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee to adapt to many kinds of systems.
\`configure' configures motion Git-58627b05aad3f978a97b36ac05f9917015030602 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1277,7 +1277,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of motion Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee:";;
short | recursive ) echo "Configuration of motion Git-58627b05aad3f978a97b36ac05f9917015030602:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1419,7 +1419,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
motion configure Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee
motion configure Git-58627b05aad3f978a97b36ac05f9917015030602
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2016,7 +2016,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by motion $as_me Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee, which was
It was created by motion $as_me Git-58627b05aad3f978a97b36ac05f9917015030602, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -5373,6 +5373,22 @@ CFLAGS="${TEMP_CFLAGS} $UNAME_DEFS $CPU_OPTIONS"
LIBS="${TEMP_LIBS}"
LDFLAGS="${TEMP_LDFLAGS}"


ac_fn_c_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"
if test "x$ac_cv_func_avformat_alloc_context" = x""yes; then :

$as_echo "#define have_avformat_alloc_context 1" >>confdefs.h

fi

ac_fn_c_check_func "$LINENO" "av_avformat_alloc_context" "ac_cv_func_av_avformat_alloc_context"
if test "x$ac_cv_func_av_avformat_alloc_context" = x""yes; then :

$as_echo "#define have_av_avformat_alloc_context 1" >>confdefs.h

fi


#
# Add the right exec path for rc scripts
#
Expand Down Expand Up @@ -5902,7 +5918,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by motion $as_me Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee, which was
This file was extended by motion $as_me Git-58627b05aad3f978a97b36ac05f9917015030602, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5964,7 +5980,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
motion config.status Git-5bd495e48fd148bf73befc5763f8d29c5b2558ee
motion config.status Git-58627b05aad3f978a97b36ac05f9917015030602
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
Expand Down
4 changes: 4 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,10 @@ CFLAGS="${TEMP_CFLAGS} $UNAME_DEFS $CPU_OPTIONS"
LIBS="${TEMP_LIBS}"
LDFLAGS="${TEMP_LDFLAGS}"


AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))

#
# Add the right exec path for rc scripts
#
Expand Down
7 changes: 7 additions & 0 deletions ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,14 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_video_codec, char *filename,
snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec);

/* Allocation the output media context. */
#ifdef have_avformat_alloc_context
ffmpeg->oc = avformat_alloc_context();
#elif defined have_av_avformat_alloc_context
ffmpeg->oc = av_alloc_format_context();
#else
ffmpeg->oc = av_mallocz(sizeof(AVFormatContext));
#endif

if (!ffmpeg->oc) {
MOTION_LOG(ERR, TYPE_ENCODER, SHOW_ERRNO, "%s: Memory error while allocating"
" output media context");
Expand Down
2 changes: 1 addition & 1 deletion git-commit-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

SNV_VERSION=`git show | grep commit|cut -d' ' -f2`
SNV_VERSION=`git show -s --format=%H`
echo -n "Git-$SNV_VERSION"

0 comments on commit 734155f

Please sign in to comment.