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

Unga unga888 at yahoo.com
Tue Oct 18 05:32:57 CEST 2011


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


The full program is attached.

Best regards
Unga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tutorial03a.c
Type: application/octet-stream
Size: 15036 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111017/1127f323/attachment.obj>


More information about the ffmpeg-devel mailing list