[FFmpeg-cvslog] avcodec: move "thread emulation" warning to common code

Michael Niedermayer git at videolan.org
Tue Sep 13 15:11:04 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 13 14:40:13 2011 +0200| [838e36635ab5be523037bd6064573299f3936a37] | committer: Michael Niedermayer

avcodec: move "thread emulation" warning  to common code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=838e36635ab5be523037bd6064573299f3936a37
---

 ffplay.c           |    3 ---
 libavcodec/utils.c |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 8123f43..9d21714 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2890,9 +2890,6 @@ static int opt_duration(const char *opt, const char *arg)
 static int opt_thread_count(const char *opt, const char *arg)
 {
     thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
-#if !HAVE_THREADS
-    fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
-#endif
     return 0;
 }
 
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ee1bfcc..da12dda 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -576,6 +576,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
     }
     avctx->frame_number = 0;
 
+    if (!HAVE_THREADS)
+        av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n");
+
     if (HAVE_THREADS && !avctx->thread_opaque) {
         ret = ff_thread_init(avctx);
         if (ret < 0) {



More information about the ffmpeg-cvslog mailing list