[FFmpeg-devel] avcodec_open() sets wrong video height

Michael Niedermayer michaelni at gmx.at
Tue Oct 18 12:38:25 CEST 2011


On Mon, Oct 17, 2011 at 08:32:57PM -0700, Unga wrote:
> Hi all
> 
> This is ffmpeg 0.7.5.
> 
> 
> The avcodec_open() sets wrong video height in pCodecCtx (AVCodecContext).
> 
> 
> printf("pCodecCtx->width  4: %d\n", pCodecCtx->width); // DEBUG
> printf("pCodecCtx->height 4: %d\n", pCodecCtx->height); // DEBUG  
>   
>   // Open codec
>   if(avcodec_open(pCodecCtx, pCodec)<0)
>     return -1; // Could not open codec
> printf("pCodecCtx->width  5: %d\n", pCodecCtx->width); // DEBUG
> printf("pCodecCtx->height 5: %d\n", pCodecCtx->height); // DEBUG  
> 
> 
> This produces:
> pCodecCtx->width  4: 1920
> pCodecCtx->height 4: 1080
> 
> pCodecCtx->width  5: 1920
> pCodecCtx->height 5: 1088
> 

most likely 1088 is the actual value of the height of the video stream
some containers can override this ...



> 
> The full program is attached.

does it behave differently from ffmpeg itself ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111018/dada4993/attachment.asc>


More information about the ffmpeg-devel mailing list