[FFmpeg-devel] [PATCH] ffmpeg.c/ffplay.c redundantly set AVCodecContext.thread_count

Måns Rullgård mans
Sun Feb 24 21:03:36 CET 2008


Michael Dorr <dorr at inb.uni-luebeck.de> writes:

> Hi,
>
> AVCodecContext.thread_count is set in avcodec_thread_init already,
> setting it again in ffmpeg.c/ffplay.c is redundant (and potentially
> confusing).
>
> Regards,
> Michael
>
> Index: ffplay.c
> ===================================================================
> --- ffplay.c	(revision 12190)
> +++ ffplay.c	(working copy)
> @@ -1735,7 +1735,6 @@
>  
>      if(thread_count>1)
>          avcodec_thread_init(enc, thread_count);
> -    enc->thread_count= thread_count;
>      switch(enc->codec_type) {
>      case CODEC_TYPE_AUDIO:
>          is->audio_stream = stream_index;

avcodec_thread_init() is only called if thread_count>1.  Does it not
need to be set in this case?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list