On 9/25/11 7:07 PM, aviad rozenhek wrote:
because thread_type is currently marked as a parameter for video streams
only, it is set to 0 for all audio streams.
on win32, this causes a redundant warning from libavcodec\w32thread.c:134
"The requested thread algorithm is not supported with this thread library"
the attached patch makes the "thread_type" option available to audio streams
too, thus removing the log.
I'm not sure why the other thread_type isn't supported by win32thread.
An hopefully more proper solution attached.
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c
index 023be0e..ceaafeb 100644
--- a/libavcodec/w32thread.c
+++ b/libavcodec/w32thread.c
@@ -130,8 +130,10 @@ int ff_thread_init(AVCodecContext *s){
ThreadContext *c;
uint32_t threadid;
- if(!(s->thread_type & FF_THREAD_SLICE)){
- av_log(s, AV_LOG_WARNING, "The requested thread algorithm is
not supported with this thread library.\n");
+ if (s->thread_type && !(s->thread_type & FF_THREAD_SLICE)) {
+ av_log(s, AV_LOG_WARNING,
+ "This thread library only supports FF_THREAD_SLICE"
+ " threading algorithm.\n");
return 0;
}
Wording could be improved as well.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel