<div dir="ltr">I found the reason, it happens because  avformat_open_input  set nb_streams to 0, but why? ....<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-16 23:33 GMT+04:00 Dmitry Adjiev <span dir="ltr"><<a href="mailto:adjiev.dmitry@gmail.com" target="_blank">adjiev.dmitry@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<p style="margin:0px;text-indent:0px"><span style="font-family:'Monospace';font-size:9pt;color:rgb(26,26,26)"> RtpStream:  "could not find codec parameters" reason: "" error code: -110 </span></p>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-16 23:33 GMT+04:00 Dmitry Adjiev <span dir="ltr"><<a href="mailto:adjiev.dmitry@gmail.com" target="_blank">adjiev.dmitry@gmail.com</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello.<br></div>Here is my code:<br><br>void RtpStream::stop()<br>{<br>    QMutexLocker guard(&mutex_);<br>

    stopped_ = true;<br>}<br><br>void RtpStream::run()<br>{<br>    QMutexLocker guard(&mutex_);<br>
<br>    if (!ip_.isEmpty()) {<br>        QSharedPointer<AVInputFormat> fmt (av_find_input_format(ip_.scheme().toLatin1() ), av_free);<br><br>        if (!fmt) {<br>            qDebug() << "RtpStream: can't finfd format";<br>


            return;<br>        }<br><br>        stopped_ = false;<br>        AVFormatContext *ctx = avformat_alloc_context();<br>        ctx->interrupt_callback.callback = interruptHandler;<br>        ctx->interrupt_callback.opaque = this;<br>


        int ret = 0;<br><br>        if (!ctx) {<br>            qDebug() << "RtpStream: can't alloc context";<br>            ret = avformat_open_input(&ctx,  ip_.toString().toLatin1().constData(), NULL, NULL);<br>


        } else<br>            ret = avformat_open_input(&ctx,  ip_.toString().toLatin1().constData(), fmt.data(), NULL);<br><br>        if (ctx)<br>            sp_fmt_ctx_ = QSharedPointer<AVFormatContext> (ctx, avformat_free_context);<br>


<br>        qDebug() << "RtpStream  ret " << ret;<br><br>        if (ret < 0) {<br>            showErrorString(ret, "RtpStream: can't open file");<br>            return;<br>        }<br>


<br>        //av_format_inject_global_side_data(ctx);<br><br>        ret = avformat_find_stream_info(ctx, NULL);<br><br>        if (ret < 0) {<br>            showErrorString(ret, "could not find codec parameters");<br>


            return;<br>        }<br><br>        guard.unlock();<br><br>        while (!stopped_) {<br><br>            qDebug() << "RtpStream: I need to find decoder :-)";<br>        }<br>    }<br><br>    else<br>


        qDebug() << "RtpStream: ip number is empty!";<br>}<br><br clear="all"><div><div>avformat_find_stream_info always fails.<br></div><div>What I do wrong?<span><font color="#888888"><br>
</font></span></div><span><font color="#888888"><div><br>-- <br>Regards,<br>Dmitry
</div></font></span></div></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Regards,<br>Dmitry
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Dmitry
</div>