Commit Graph

202 Commits

Author SHA1 Message Date
Michael Niedermayer
4eea41cba1 Merge commit 'cc14ee03a7b91c69343f8d60c9e089a1950eeadb'
* commit 'cc14ee03a7b91c69343f8d60c9e089a1950eeadb':
  lavc: split slice and frame threading functions into separate files

Conflicts:
	libavcodec/Makefile
	libavcodec/pthread.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 10:44:34 +01:00
Michael Niedermayer
3d4dc43259 Merge commit '5cd6513f5be14b9744783d3d9e853d3f11065e93'
* commit '5cd6513f5be14b9744783d3d9e853d3f11065e93':
  pthread: drop avcodec_ prefixes from static functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-04 09:55:24 +01:00
Anton Khirnov
cc14ee03a7 lavc: split slice and frame threading functions into separate files 2013-11-04 08:51:26 +01:00
Anton Khirnov
5cd6513f5b pthread: drop avcodec_ prefixes from static functions 2013-11-04 08:51:26 +01:00
Anton Khirnov
a1504eee41 lavc: deprecate AVCodecContext.debug_mv
It has been unused since 37045e4229.
2013-10-31 20:22:51 +01:00
Mickaël Raulet
e146c326b9 avcodec/pthread: add wpp api
cherry picked from commit c7765f3295fe7dc0653161c6a3d3e1778b76ee67
cherry picked from commit 0008c4979fc1d1bc24d4d2c791715f6dd017563c

Conflicts:

	libavcodec/utils.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-22 19:55:47 +02:00
Michael Niedermayer
2444fca523 Merge commit '5152196b2b47d446d9a509b9bfb318daa26a1f2b'
* commit '5152196b2b47d446d9a509b9bfb318daa26a1f2b':
  pthread: Avoid spurious wakeups

See: e3329474a3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-21 19:51:21 +02:00
Ben Jackson
5152196b2b pthread: Avoid spurious wakeups
pthread_wait_cond can wake up unexpectedly (Wikipedia: Spurious_wakeup).

The FF_THREAD_SLICE thread mechanism could spontaneously execute
jobs or allow the caller of avctx->execute to return before all
jobs were complete.

Test both cases to ensure the wakeup is real.

Signed-off-by: Ben Jackson <ben@ben.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-10-21 15:28:03 +02:00
Derek Buitenhuis
eb90a2091f pthread: Fix deadlock during thread initialization
Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.

Don't call pthread_cond_wait() if c->done is set.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-13 05:50:00 -04:00
Michael Niedermayer
20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Michael Niedermayer
10336ca640 Merge commit '50612484e058e8b241f0528584d64d9d2ccebf12'
* commit '50612484e058e8b241f0528584d64d9d2ccebf12':
  pthread: Rename thread_init to avoid symbol collision

Conflicts:
	libavcodec/pthread.c
	libavfilter/pthread.c

See: 674d8a9629
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 10:40:15 +02:00
Sean McGovern
50612484e0 pthread: Rename thread_init to avoid symbol collision
The AIX threads library exposes a function with the same name.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-17 00:13:31 +03:00
Carl Eugen Hoyos
674d8a9629 Rename thread_init() in libavcodec and libavfilter as library_thread_init().
The aix header sys/thread.h contains a definition for thread_init().
2013-06-30 13:47:45 +02:00
Paul B Mahol
d5f7f1fef1 audio frame multi-threaded decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Dave Yeo
e615a77799 os2threads: move from lavc to compat/
For useage in other places besides lavc. Needed after commit
90f9a5830b

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 12:49:20 +02:00
Michael Niedermayer
4cf7b87551 av_cpu_count: factorize "detected %d logical cores" message
Also print the message just once

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 03:19:55 +02:00
Michael Niedermayer
42bb3e4db6 avcodec: remove ff_get_logical_cpus()
This simplifies the code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 20:25:53 +02:00
Michael Niedermayer
fe40a9f98f Merge commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675'
* commit '2a6eaeaa85d17b27ee0dd449183ec197c35c9675':
  Move get_logical_cpus() from lavc/pthread to lavu/cpu.

Conflicts:
	doc/APIchanges
	libavcodec/pthread.c
	libavutil/cpu.c
	libavutil/cpu.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 13:24:28 +02:00
Michael Niedermayer
a4d3757b29 Merge commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d'
* commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d':
  w32pthreads: move from lavc to compat/

Conflicts:
	libavcodec/Makefile
	libavcodec/pthread.c
	libavcodec/vp8.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-24 13:01:41 +02:00
Anton Khirnov
2a6eaeaa85 Move get_logical_cpus() from lavc/pthread to lavu/cpu.
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Anton Khirnov
90f9a5830b w32pthreads: move from lavc to compat/
It will be used in other places than lavc.
2013-05-24 09:26:54 +02:00
Michael Niedermayer
1a0057dc88 Merge commit 'db8e336e5fc18c41cb4e9bab1960349e9800d546'
* commit 'db8e336e5fc18c41cb4e9bab1960349e9800d546':
  pthread: reindent

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 11:55:40 +02:00
Michael Niedermayer
36d349034e Merge commit '30e256430eb88c6d4c382581b89bca171d79fbc0'
* commit '30e256430eb88c6d4c382581b89bca171d79fbc0':
  lavc/pthread: remove obsolete checks

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 11:49:00 +02:00
Anton Khirnov
db8e336e5f pthread: reindent 2013-05-17 07:44:50 +02:00
Anton Khirnov
30e256430e lavc/pthread: remove obsolete checks
Those were useful when avcodec_thread_init() was a public functions. It
was deprecated and removed some time ago, so those checks are not needed
anymore.
2013-05-17 07:44:40 +02:00
Michael Niedermayer
ab074ab9fe avcodec/pthread: fix ffv1 with 2 threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 00:28:51 +02:00
Michael Niedermayer
a0c0900e47 ffv1dec: Support frame threading with gop > 1
This is about 20-30% faster than slice threading

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-11 20:17:45 +02:00
Michael Niedermayer
8f0db04b08 avcodec/pthread: use THREAD_SAFE_CALLBACKS() to simplifx more code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-25 16:01:42 +02:00
Michael Niedermayer
94b3a666fa avcodec/pthread: Make sure ff_thread_finish_setup() conditions match
Prevents warning from being shown due to multiple calls.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-25 15:55:01 +02:00
Michael Niedermayer
7c49c8b0ac Merge commit '94660c35249e11c53b9a9f0c2f85c4335b21eda7'
* commit '94660c35249e11c53b9a9f0c2f85c4335b21eda7':
  threads: always call thread_finish_setup for intra codecs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-23 10:12:58 +02:00
Janne Grunau
94660c3524 threads: always call thread_finish_setup for intra codecs
Intra codecs do not need an update_thread_context() function and never
call ff_thread_finish_setup(). They rely on ff_thread_get_buffer()
calling it. So call it even if the get_buffer2 function pointer is
avcodec_default_get_buffer2 and it has not been called before.
2013-04-22 17:11:20 +02:00
Reimar Döffinger
c10d498bfd Add thread-safe wrapper for get_format().
Just like get_buffer, get_format should not be called from a different
thread if thread_safe_callbacks is not set.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-04-15 09:04:07 +02:00
Michael Niedermayer
ace0cfea60 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hwaccel: fix use with frame based multithreading

Conflicts:
	libavcodec/h263dec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-27 11:51:33 +01:00
Janne Grunau
05fa79b844 hwaccel: fix use with frame based multithreading
Allows use of AVHWAccel based decoders with frame based multithreading.
The decoders will be forced into an non-concurrent mode by delaying
ff_thread_finish_setup() calls after decoding of the current frame
is finished.

This wastes memory by unnecessarily using multiple threads and thus
copies of the decoder context but allows seamless switching between
hardware accelerated and frame threaded software decoding when the
hardware decoder does not support the stream.
2013-03-26 19:44:50 +01:00
Michael Niedermayer
084510d12a Merge commit 'c71c80f53b6a63fd6360d9de5a262f9e7c85681f'
* commit 'c71c80f53b6a63fd6360d9de5a262f9e7c85681f':
  pthread: unref already decoded frames when flushing the decoder

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:50:33 +01:00
Hendrik Leppkes
c71c80f53b pthread: unref already decoded frames when flushing the decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:19:08 +01:00
Hendrik Leppkes
97f8c6e147 pthread: update all get_buffer checks for get_buffer2
This restores the performance of simple frame-threaded codecs back to
their pre-merge levels.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 02:25:46 +01:00
Clément Bœsch
1ec94b0f06 lavc: factorize ff_{thread_,re,}get_buffer error messages.
Coccinelle profile used:

  @@
  expression r, ctx, f, loglevel, str, flags;
  @@

  -if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_get_buffer(ctx, f, flags)) < 0)
  +    return r;

  @@
  expression r, ctx, f, loglevel, str;
  @@

  -if ((r = ff_reget_buffer(ctx, f)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_reget_buffer(ctx, f)) < 0)
  +    return r;

  @@
  expression r, ctx, f, loglevel, str, flags;
  @@

  -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
  +    return r;

...along with some manual patches for the remaining ones.
2013-03-13 19:00:10 +01:00
Michael Niedermayer
8ded1718bd Merge commit 'fce68c93554803801c32c1b20509bfa8d496b02a'
* commit 'fce68c93554803801c32c1b20509bfa8d496b02a':
  pthread: unref the decoded but not returned frames on close.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 13:39:44 +01:00
Michael Niedermayer
6b6b0e9dae pthread: fix unused variable warning 2013-03-12 18:10:09 +01:00
Michael Niedermayer
80e9e63c94 Merge commit '759001c534287a96dc96d1e274665feb7059145d'
* commit '759001c534287a96dc96d1e274665feb7059145d':
  lavc decoders: work with refcounted frames.

Anton Khirnov (1):
      lavc decoders: work with refcounted frames.

Clément Bœsch (47):
      lavc/ansi: reset file
      lavc/ansi: re-do refcounted frame changes from Anton
      fraps: reset file
      lavc/fraps: switch to refcounted frames
      gifdec: reset file
      lavc/gifdec: switch to refcounted frames
      dsicinav: resolve conflicts
      smc: resolve conflicts
      zmbv: resolve conflicts
      rpza: resolve conflicts
      vble: resolve conflicts
      xxan: resolve conflicts
      targa: resolve conflicts
      vmnc: resolve conflicts
      utvideodec: resolve conflicts
      tscc: resolve conflicts
      ulti: resolve conflicts
      ffv1dec: resolve conflicts
      dnxhddec: resolve conflicts
      v210dec: resolve conflicts
      vp3: resolve conflicts
      vcr1: resolve conflicts
      v210x: resolve conflicts
      wavpack: resolve conflicts
      pngdec: fix compilation
      roqvideodec: resolve conflicts
      pictordec: resolve conflicts
      mdec: resolve conflicts
      tiertexseqv: resolve conflicts
      smacker: resolve conflicts
      vb: resolve conflicts
      vqavideo: resolve conflicts
      xl: resolve conflicts
      tmv: resolve conflicts
      vmdav: resolve conflicts
      truemotion1: resolve conflicts
      truemotion2: resolve conflicts
      lcldec: fix compilation
      libcelt_dec: fix compilation
      qdrw: fix compilation
      r210dec: fix compilation
      rl2: fix compilation
      wnv1: fix compilation
      yop: fix compilation
      tiff: resolve conflicts
      interplayvideo: fix compilation
      qpeg: resolve conflicts (FIXME/TESTME).

Hendrik Leppkes (33):
      012v: convert to refcounted frames
      8bps: fix compilation
      8svx: resolve conflicts
      4xm: resolve conflicts
      aasc: resolve conflicts
      bfi: fix compilation
      aura: fix compilation
      alsdec: resolve conflicts
      avrndec: convert to refcounted frames
      avuidec: convert to refcounted frames
      bintext: convert to refcounted frames
      cavsdec: resolve conflicts
      brender_pix: convert to refcounted frames
      cinepak: resolve conflicts
      cinepak: avoid using AVFrame struct directly in private context
      cljr: fix compilation
      cpia: convert to refcounted frames
      cscd: resolve conflicts
      iff: resolve conflicts and do proper conversion to refcounted frames
      4xm: fix reference frame handling
      cyuv: fix compilation
      dxa: fix compilation
      eacmv: fix compilation
      eamad: fix compilation
      eatgv: fix compilation
      escape124: remove unused variable.
      escape130: convert to refcounted frames
      evrcdec: convert to refcounted frames
      exr: convert to refcounted frames
      mvcdec: convert to refcounted frames
      paf: properly free the frame data on decode close
      sgirle: convert to refcounted frames
      lavfi/moviesrc: use refcounted frames

Michael Niedermayer (56):
      Merge commit '759001c534287a96dc96d1e274665feb7059145d'
      resolve conflicts in headers
      motion_est: resolve conflict
      mpeg4videodec: fix conflicts
      dpcm conflict fix
      dpx: fix conflicts
      indeo3: resolve confilcts
      kmvc: resolve conflicts
      kmvc: resolve conflicts
      h264: resolve conflicts
      utils: resolve conflicts
      rawdec: resolve conflcits
      mpegvideo: resolve conflicts
      svq1enc: resolve conflicts
      mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads
      pthreads: resolve conflicts
      frame_thread_encoder: simple compilefix not yet tested
      snow: update to buffer refs
      crytsalhd: fix compile
      dirac: switch to new API
      sonic: update to new API
      svq1: resolve conflict, update to new API
      ffwavesynth: update to new buffer API
      g729: update to new API
      indeo5: fix compile
      j2kdec: update to new buffer API
      linopencore-amr: fix compile
      libvorbisdec: update to new API
      loco: fix compile
      paf: update to new API
      proresdec: update to new API
      vp56: update to new api / resolve conflicts
      xface: convert to refcounted frames
      xan: fix compile&fate
      v408: update to ref counted buffers
      v308: update to ref counted buffers
      yuv4dec: update to ref counted buffers
      y41p: update to ref counted frames
      xbm: update to refcounted frames
      targa_y216: update to refcounted buffers
      qpeg: fix fate/crash
      cdxl: fix fate
      tscc: fix reget buffer useage
      targa_y216dec: fix style
      msmpeg4: fix fate
      h264: ref_picture() copy fields that have been lost too
      update_frame_pool: use channel field
      h264: Put code that prevents deadlocks back
      mpegvideo: dont allow last == current
      wmalossless: fix buffer ref messup
      ff_alloc_picture: free tables in case of dimension mismatches
      h264: fix null pointer dereference and assertion failure
      frame_thread_encoder: update to bufrefs
      ec: fix used arrays
      snowdec: fix off by 1 error in dimensions check
      h264: disallow single unpaired fields as references of frames

Paul B Mahol (2):
      lavc/vima: convert to refcounted frames
      sanm: convert to refcounted frames

Conflicts:
	libavcodec/4xm.c
	libavcodec/8bps.c
	libavcodec/8svx.c
	libavcodec/aasc.c
	libavcodec/alsdec.c
	libavcodec/anm.c
	libavcodec/ansi.c
	libavcodec/avs.c
	libavcodec/bethsoftvideo.c
	libavcodec/bfi.c
	libavcodec/c93.c
	libavcodec/cavsdec.c
	libavcodec/cdgraphics.c
	libavcodec/cinepak.c
	libavcodec/cljr.c
	libavcodec/cscd.c
	libavcodec/dnxhddec.c
	libavcodec/dpcm.c
	libavcodec/dpx.c
	libavcodec/dsicinav.c
	libavcodec/dvdec.c
	libavcodec/dxa.c
	libavcodec/eacmv.c
	libavcodec/eamad.c
	libavcodec/eatgq.c
	libavcodec/eatgv.c
	libavcodec/eatqi.c
	libavcodec/error_resilience.c
	libavcodec/escape124.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/flicvideo.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g723_1.c
	libavcodec/gifdec.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_direct.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/huffyuvdec.c
	libavcodec/idcinvideo.c
	libavcodec/iff.c
	libavcodec/indeo2.c
	libavcodec/indeo3.c
	libavcodec/internal.h
	libavcodec/interplayvideo.c
	libavcodec/ivi_common.c
	libavcodec/jvdec.c
	libavcodec/kgv1dec.c
	libavcodec/kmvc.c
	libavcodec/lagarith.c
	libavcodec/libopenjpegdec.c
	libavcodec/mdec.c
	libavcodec/mimic.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mmvideo.c
	libavcodec/motion_est.c
	libavcodec/motionpixels.c
	libavcodec/mpc7.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/msrle.c
	libavcodec/msvideo1.c
	libavcodec/nuv.c
	libavcodec/options_table.h
	libavcodec/pcx.c
	libavcodec/pictordec.c
	libavcodec/pngdec.c
	libavcodec/pnmdec.c
	libavcodec/pthread.c
	libavcodec/qpeg.c
	libavcodec/qtrle.c
	libavcodec/r210dec.c
	libavcodec/rawdec.c
	libavcodec/roqvideodec.c
	libavcodec/rpza.c
	libavcodec/smacker.c
	libavcodec/smc.c
	libavcodec/svq1dec.c
	libavcodec/svq1enc.c
	libavcodec/targa.c
	libavcodec/tiertexseqv.c
	libavcodec/tiff.c
	libavcodec/tmv.c
	libavcodec/truemotion1.c
	libavcodec/truemotion2.c
	libavcodec/tscc.c
	libavcodec/ulti.c
	libavcodec/utils.c
	libavcodec/utvideodec.c
	libavcodec/v210dec.c
	libavcodec/v210x.c
	libavcodec/vb.c
	libavcodec/vble.c
	libavcodec/vcr1.c
	libavcodec/vmdav.c
	libavcodec/vmnc.c
	libavcodec/vp3.c
	libavcodec/vp56.c
	libavcodec/vp56.h
	libavcodec/vp6.c
	libavcodec/vqavideo.c
	libavcodec/wavpack.c
	libavcodec/xl.c
	libavcodec/xxan.c
	libavcodec/zmbv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 03:23:28 +01:00
Anton Khirnov
fce68c9355 pthread: unref the decoded but not returned frames on close.
Fixes memleaks when frame mt is used and the decoder is not flushed at
the end.
2013-03-11 18:30:35 +01:00
Michael Niedermayer
d9d97f9b33 Merge commit '1a5e9130162b8adc898e5f6aea82b6372d1e4e6c'
* commit '1a5e9130162b8adc898e5f6aea82b6372d1e4e6c':
  pthread: avoid copying input packets when possible.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 19:17:38 +01:00
Anton Khirnov
759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Anton Khirnov
1a5e913016 pthread: avoid copying input packets when possible. 2013-03-08 07:35:14 +01:00
Michael Niedermayer
3c8085dc42 Merge commit 'e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838'
* commit 'e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838':
  pthread: make ff_thread_release_buffer idempotent.
  mvi: set framerate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-29 14:19:56 +01:00
Anton Khirnov
e6b1c3bbe7 pthread: make ff_thread_release_buffer idempotent.
I.e. don't do anything on already released frames.
2013-01-29 07:32:10 +01:00
Michael Niedermayer
a6e4796fbf pthread: Do not use a half updated context as master for deallocation.
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-13 06:22:04 +01:00
Clément Bœsch
98dc25672f lavc/pthread: do not re-define _GNU_SOURCE if already defined.
This fixes the following warning with GCC:
    libavcodec/pthread.c:35:0: warning: _GNU_SOURCE redefined [enabled by default]
    <command-line>::0: note: this is the location of the previous definition

The reason of the presence of this flag is:
    % pkg-config --cflags sdl
    -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
2012-12-24 00:54:06 +01:00