I found the reason, it happens because avformat_open_input set nb_streams to 0, but why? ....
2014-08-16 23:33 GMT+04:00 Dmitry Adjiev <[email protected]>: > RtpStream: "could not find codec parameters" reason: "" error code: -110 > > > 2014-08-16 23:33 GMT+04:00 Dmitry Adjiev <[email protected]>: > > Hello. >> Here is my code: >> >> void RtpStream::stop() >> { >> QMutexLocker guard(&mutex_); >> stopped_ = true; >> } >> >> void RtpStream::run() >> { >> QMutexLocker guard(&mutex_); >> >> if (!ip_.isEmpty()) { >> QSharedPointer<AVInputFormat> fmt >> (av_find_input_format(ip_.scheme().toLatin1() ), av_free); >> >> if (!fmt) { >> qDebug() << "RtpStream: can't finfd format"; >> return; >> } >> >> stopped_ = false; >> AVFormatContext *ctx = avformat_alloc_context(); >> ctx->interrupt_callback.callback = interruptHandler; >> ctx->interrupt_callback.opaque = this; >> int ret = 0; >> >> if (!ctx) { >> qDebug() << "RtpStream: can't alloc context"; >> ret = avformat_open_input(&ctx, >> ip_.toString().toLatin1().constData(), NULL, NULL); >> } else >> ret = avformat_open_input(&ctx, >> ip_.toString().toLatin1().constData(), fmt.data(), NULL); >> >> if (ctx) >> sp_fmt_ctx_ = QSharedPointer<AVFormatContext> (ctx, >> avformat_free_context); >> >> qDebug() << "RtpStream ret " << ret; >> >> if (ret < 0) { >> showErrorString(ret, "RtpStream: can't open file"); >> return; >> } >> >> //av_format_inject_global_side_data(ctx); >> >> ret = avformat_find_stream_info(ctx, NULL); >> >> if (ret < 0) { >> showErrorString(ret, "could not find codec parameters"); >> return; >> } >> >> guard.unlock(); >> >> while (!stopped_) { >> >> qDebug() << "RtpStream: I need to find decoder :-)"; >> } >> } >> >> else >> qDebug() << "RtpStream: ip number is empty!"; >> } >> >> avformat_find_stream_info always fails. >> What I do wrong? >> >> -- >> Regards, >> Dmitry >> > > > > -- > Regards, > Dmitry > -- Regards, Dmitry
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
