|
pFrameYUV存储了解码后的数据,格式为YUV420P;现用如下方式存储为yuv文件:
- fwrite(pFrameYUV->data[0],(pCodecCtx->width)*(pCodecCtx->height),1,output);
- fwrite(pFrameYUV->data[1],(pCodecCtx->width)*(pCodecCtx->height)/4,1,output);
- fwrite(pFrameYUV->data[2],(pCodecCtx->width)*(pCodecCtx->height)/4,1,output);
使用ffplay播放后出现花屏现象,这是什么原因呢,
ps:
1.解码后的数据转为rgb24后可以通过播放器显示,这说明pFrameYUV存储的yuv数据是正确的;
2.像素的宽和高设置没有错误
期待大牛的解答;谢谢!
|
|