diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-27 17:03:30 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-27 17:03:30 +0000 |
commit | 5cf60e87d47f07c1580e2c3136c20a40eff2eecd (patch) | |
tree | 9651719fbdd9f6b203a5143a15cbb6a0234554db | |
parent | 281f9026cdf24551ec31383ea13d3ee4ebe87a22 (diff) | |
download | xine-lib-5cf60e87d47f07c1580e2c3136c20a40eff2eecd.tar.gz xine-lib-5cf60e87d47f07c1580e2c3136c20a40eff2eecd.tar.bz2 |
Gert Vervoort's aspect ratio patch
CVS patchset: 1783
CVS date: 2002/04/27 17:03:30
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index c7f52006b..c10e0e7d6 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.34 2002/04/23 15:45:23 esnel Exp $ + * $Id: xine_decoder.c,v 1.35 2002/04/27 17:03:30 miguelfreitas Exp $ * * xine decoder plugin using ffmpeg * @@ -134,7 +134,8 @@ static void ff_init (video_decoder_t *this_gen, vo_instance_t *video_out) { static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { ff_decoder_t *this = (ff_decoder_t *) this_gen; - + int ratio; + #ifdef LOG printf ("ffmpeg: processing packet type = %08x, buf : %d, buf->decoder_flags=%08x\n", buf->type, buf, buf->decoder_flags); @@ -257,11 +258,27 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { emms_c (); #endif + switch(this->context.aspect_ratio_info) { + case FF_ASPECT_SQUARE: + ratio = XINE_ASPECT_RATIO_SQUARE; + break; + case FF_ASPECT_4_3_625: + case FF_ASPECT_4_3_525: + ratio = XINE_ASPECT_RATIO_4_3; + break; + case FF_ASPECT_16_9_625: + case FF_ASPECT_16_9_525: + ratio = XINE_ASPECT_RATIO_ANAMORPHIC; + break; + default: + ratio = XINE_ASPECT_RATIO_DONT_TOUCH; + } + img = this->video_out->get_frame (this->video_out, /* this->av_picture.linesize[0], */ this->biWidth, this->biHeight, - 42, + ratio, IMGFMT_YV12, VO_BOTH_FIELDS); |