[Libav-user] AVCodecContext: width/height info changes after avcodec_open()?
marlam at marlam.de
Mon Oct 3 20:18:59 CEST 2011
I have a problem getting the correct width/height with a few video files.
After avformat_open_input(), the AVCodecContext entries for the video
stream report the following:
The difference of 8 pixels in height is presumably used to get a
multiple of 16.
But after calling avcodec_open() for that AVCodecContext, both value
pairs report the same:
Using these width/height values results in additional 8 gray pixel lines
at the bottom of each displayed frame. This also happens with FFplay
As a workaround, I now save the initial width/height information and use
that if it differs from the values after avcodec_open(). But is that
correct? Will this break in the future?
FFplay does not seem to use coded_width/coded_height at all. Does this
mean a video player program should always only use width/height? What
should be done when the two differ?
More information about the Libav-user