ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 7324|回复: 0

[源码] avframe帧存储问题

[复制链接]
发表于 2014-3-10 16:07:34 | 显示全部楼层 |阅读模式
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.像素的宽和高设置没有错误






期待大牛的解答;谢谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-25 12:01 , Processed in 0.045779 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表