[Ffmpeg-devel] [PATCH] codec thread init reorder
Limin Wang
lance.lmwang
Sun Apr 1 05:34:49 CEST 2007
Hi,
$sub, next patch will remove threads option in ffmpeg.c to
use threads option in AVOption.
Thanks,
Limin
-------------- next part --------------
Index: ffmpeg.c
===================================================================
--- ffmpeg.c (revision 8565)
+++ ffmpeg.c (working copy)
@@ -2697,9 +2697,6 @@
bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
video_bitstream_filters= NULL;
- if(thread_count>1)
- avcodec_thread_init(st->codec, thread_count);
-
video_enc = st->codec;
if(video_codec_tag)
@@ -2787,6 +2784,9 @@
video_enc->max_qdiff = video_qdiff;
video_enc->rc_eq = video_rc_eq;
video_enc->thread_count = thread_count;
+ if(thread_count>1)
+ avcodec_thread_init(st->codec, thread_count);
+
p= video_rc_override_string;
for(i=0; p; i++){
int start, end, q;
@@ -2855,9 +2855,6 @@
bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters;
audio_bitstream_filters= NULL;
- if(thread_count>1)
- avcodec_thread_init(st->codec, thread_count);
-
audio_enc = st->codec;
audio_enc->codec_type = CODEC_TYPE_AUDIO;
audio_enc->strict_std_compliance = strict;
@@ -2891,6 +2888,9 @@
audio_enc->global_quality = st->quality = FF_QP2LAMBDA * audio_qscale;
}
audio_enc->thread_count = thread_count;
+ if(thread_count>1)
+ avcodec_thread_init(st->codec, thread_count);
+
audio_enc->channels = audio_channels;
}
audio_enc->sample_rate = audio_sample_rate;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070401/785a01cf/attachment.pgp>
More information about the ffmpeg-devel
mailing list