diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-07-10 14:07:33 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-07-10 14:07:33 +0000 |
commit | 24c9de726cc5040869cdcd58fdf2e66949a682d3 (patch) | |
tree | 90c2cf3fc965d719bbf47b748da4642a3a8de64e /src/libmpeg2/xine_decoder.c | |
parent | c636a67577b49a714e4f5919ab1073b79979de37 (diff) | |
download | xine-lib-24c9de726cc5040869cdcd58fdf2e66949a682d3.tar.gz xine-lib-24c9de726cc5040869cdcd58fdf2e66949a682d3.tar.bz2 |
* handle aspect special buffers and force the aspect to the mode requested
by the input plugin (currently only xine-dvdnav forces aspects)
* detect pan&scan material by examining the streams scale prohibitions
CVS patchset: 2248
CVS date: 2002/07/10 14:07:33
Diffstat (limited to 'src/libmpeg2/xine_decoder.c')
-rw-r--r-- | src/libmpeg2/xine_decoder.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index bce1513c3..1b53d0717 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/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.35 2002/07/05 17:32:03 mroi Exp $ + * $Id: xine_decoder.c,v 1.36 2002/07/10 14:07:33 mroi Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -64,6 +64,7 @@ static void mpeg2dec_init (video_decoder_t *this_gen, vo_instance_t *video_out) mpeg2_init (&this->mpeg2, video_out); video_out->open(video_out); this->video_out = video_out; + this->mpeg2.force_aspect = 0; pthread_mutex_unlock (&this->lock); @@ -80,7 +81,19 @@ static void mpeg2dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) #endif pthread_mutex_lock (&this->lock); - + + /* handle aspect hints from xine-dvdnav */ + if (buf->decoder_flags & BUF_FLAG_SPECIAL) { + if (buf->decoder_info[1] == BUF_SPECIAL_ASPECT) { + this->mpeg2.force_aspect = buf->decoder_info[2]; + if (buf->decoder_info[3] == 0x1 && buf->decoder_info[2] == XINE_ASPECT_RATIO_ANAMORPHIC) + /* letterboxing is denied, we have to do pan&scan */ + this->mpeg2.force_aspect = XINE_ASPECT_RATIO_PAN_SCAN; + } + pthread_mutex_unlock (&this->lock); + return; + } + if (buf->decoder_flags & BUF_FLAG_PREVIEW) { mpeg2_find_sequence_header (&this->mpeg2, buf->content, buf->content + buf->size); } else { |