<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I had a problem to set up variable on avdec_h264 which is in decodebin and appears after pipeline being started. I'm using GST 1.6.4.<br><br></div>Some kind guy told me to set it up in a bus watcher. So in my bus watcher function I have such piece of code:<br>        if (new_state == GST_STATE_READY) {<br>            GstElement* avdec = get_pipeline_element(pipeline, "avdec_h264");<br>            if (avdec && args_has_argument(job->args, "avdec_h264.max-threads")) {<br>                int threads = args_to_int(args_get_value(job->args, "avdec_h264.max-threads"));<br>                g_object_set(avdec, "max-threads", threads, NULL);<br>            }<br>        }<br><br></div>But I have an issue some of started instances consumes more memory, but usually after restart they're ok on mem. So I've checked thread number on those tasks and found out that max-threads doesn't always apply before starting the stream, at least it ignores max-threads.<br><br></div>Ie 1st run has 45 threads and consumes 660mb, after restart - 23 threads and 280mb.<br><br></div>So I believe it's some kind of a race condition. Since GST heavy multithreaded framework, I find it most likely reason.<br><br></div>How I can avoid it?<br><br></div>Thx,<br></div>AlexBhpp<br></div>