[Ffmpeg-devel] Distorted output when sequence_display_extension is present

Nico Sabbi nicola_sabbi
Sun Jun 25 14:34:04 CEST 2006

this file: ftp://www.mplayerhq.hu/MPlayer/samples/MPEG-VOB/winnicki.mpg
is a 640x480 mpeg2 sample encoded with a sequence_display_extension
in which horizontal_display_size=640 and vertical_display_size=240.

libavcodec assigns SAR=0.5 (the corresponding DAR is 0.67), which
results in a very badly distored picture.

If in mpeg12.c I modify the assignment of avctx->sample_aspect_ratio
in terms of
(AVRational){s->width, s->height}
instead of
(AVRational){s1->pan_scan.width, s1->pan_scan.height}
the output is no more distorted.

This problems is visibile in other samples that I have but that I can't 

IIUC the parameters in the sequence_display_extension (at least in this 
define a region to crop (640x240) but lavc doesn't seem to be cropping it.

Is this an incorrect stream or a bug in libavcodec?


More information about the ffmpeg-devel mailing list