ffmpeg と libx264 を使用して H264 ビデオ ストリーム (Parrot AR Drone から) をデコードする BlackBerry 10 アプリケーションを作成しています。これらのライブラリは両方とも BlackBerry QNX 用にコンパイルされています。
これが私のコードです:
av_register_all();
avcodec_register_all();
avformat_network_init();
printf("AV setup complete\n");
const char* drone_addr = "http://192.168.1.1:5555";
AVFormatContext* pFormatCtx = NULL;
AVInputFormat* pInputFormat = av_find_input_format("H264");
printf("Opening video feed from drone\n");
//THIS LINE FAILS
int result = avformat_open_input(&pFormatCtx, drone_addr, pInputFormat, NULL);
最後の行は次のエラーで失敗します。
Malloc Check Failed: :../../dlist.c:1168
このエラーを修正またはさらにデバッグするにはどうすればよいですか?
更新pInputFormat
:エラーは、に提供した場合にのみ発生しavformat_open_input
ます。NULL を指定すると、エラーは発生しません。しかし、私のアプリでは、ffmpeg がフィードだけからビデオ形式を判断することはできないため、このパラメーターを指定する必要があります。