No start code is found.

简介: No start code is found.

[h264 @ 0x833680] No start code is found. [h264 @ 0x833680] Error

splitting the input into NAL units.


执行avcodec_send_packet(decodec_ctx_v, &read_pkt);

这个有两个原因:

一是解码器上下文decodec_ctx_v结构体内参数配置缺少

二是解码器上下文decodec_ctx_v结构体内参数配置与read_pkt内的数据不匹配,比如视频,width不同。

如果从输入流中获取decodec_ctx_v内的各种参数,这两中错误就可以避免,如下

avformat_open_input(&ic, URL, NULL, NULL);
...//伪代码
avcodec_parameters_to_context(decodec_ctx_v, ic->streams[video_index]->codecpar);


注意:

当decodec_ctx_v是视频的解码上下文,而read_pkt是音频数据时,也会发生错误,其实就是错误二。

这时候要判断从av_read_frame(ic, &read_pkt);中读取的数据是视频还是音频。

判断read_pkt是视频还是音频帧,详见另一篇文章:AVPacket结构体内几个变量分析


 

相关文章
Error running Application. Command line is too long.
【2月更文挑战第2天】Error running Application. Command line is too long. 问题处理
|
2月前
|
Perl
报错:error Parsing error: x-invalid-end-tag
报错:error Parsing error: x-invalid-end-tag
|
8月前
|
Java 开发工具 git
解决Error running XXXApplicationCommand line is too long.报错
解决Error running XXXApplicationCommand line is too long.报错
|
4月前
|
编译器 Serverless Go
Fail to start function, Code:1
Fail to start function, Code:1
28 2
|
Python
pychram中提示:Process finished with exit code 0
"Process finished with exit code 0" 是PyCharm中的提示信息,表示程序已经成功地执行完毕并且没有发生任何错误。在PyCharm中,当程序正常终止并返回退出代码0时,这个消息会在控制台中显示。 在PyCharm中运行程序时,它会在一个单独的进程中执行,当程序完成执行后,它会向操作系统返回一个退出代码。退出代码0表示程序成功执行完毕,而非零的退出代码通常表示错误或异常终止。 当出现"Process finished with exit code 0"的提示时,意味着你的程序已经成功地执行完毕,没有发生任何错误或异常情况。你可以通过检查程序输出或任何其他预
1201 0
|
Perl
Command PhaseScriptExecution failed with a nonzero exit code问题解决
在某次pod install后,run项目出现以下错误
610 0
collect1:error:ld returned 1 exit status 解决办法
collect1:error:ld returned 1 exit status 解决办法
collect1:error:ld returned 1 exit status 解决办法
|
资源调度
yarn start error Command failed with exit code 1解决
yarn start error Command failed with exit code 1解决
875 0
|
jenkins 持续交付 图形学
报错Command XXXX/dsymutil failed with exit code 11
报错Command XXXX/dsymutil failed with exit code 11
192 0
报错Command XXXX/dsymutil failed with exit code 11
|
自然语言处理 Python
A reportable application error has occurred. Conda has prepared the above report......
A reportable application error has occurred. Conda has prepared the above report......
180 0
A reportable application error has occurred. Conda has prepared the above report......

热门文章

最新文章