Jump to content
  • Advertisement
Sign in to follow this  

ffmpeg question

This topic is 3713 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Problem solved: My view resolutions were wrong so I was going out of bounds in memory. I am attempting to a create a home security application that uses ffmpeg to record video, but I have hit a snag when I try to write a frame. I keep crashing when I try to convert from RGB to YUV pix fmt. I am setting the AVCodecContext to the videostream's codec, then I am using avpicture_fill() to set up the RGBFrame, and then I am using sws_scale() to convert from RGB to YUV pix fmt. My parameters I am passing into sws_scale all appear to be valid, but I crash somewhere inside that function. Unfortunately I can't step in any further since its defined inside a *.lib file. Has anyone come across a this problem or a similar problem with ffmpeg and how was it resolved. Or is there some way I can crack open the ffmeg libray so I can debug the issue myself. Here is what I am passing in: sws_scale( m_pImageConvertContext, m_pRGBFrame->data, m_pRGBFrame->linesize, 0, pAVCodecContext->height, m_pYUVFrame->data, m_pYUVFrame->linesize ); m_pImageConvertContext: 0x037c2cb0 resampling_ctx: 0x037c6c30 src_pix_fmt: PIX_FMT_RGB32 dst_pix_fmt: PIX_FMT_YUV420P m_pRGBFrame->data: 0x037c6b40 [0]: 0x035f0040 "" [1]: 0x00000000 <Bad Ptr> [2]: 0x00000000 <Bad Ptr> [3]: 0x00000000 <Bad Ptr> m_pRGBFrame->linesize: 0x037c6b50 [0]: 2560 [1]: 0 [2]: 0 [3]: 0 pAVCodecContext->height: 512 m_pYUVFrame->data: 0x0191fce0 [0]: 0x0381a680 "QQQ..." [1]: 0x0386a680 "ZZZ..." [2]: 0x0387e680 "äää..." [3]: 0x00000000 <Bad Ptr> m_pYUVFrame->linesize: 0x0191fcf0 [0]: 640 [1]: 320 [2]: 320 [3]: 0 [Edited by - TDencker on April 28, 2008 3:54:12 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!