diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2005-06-04 10:54:22 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2005-06-04 10:54:22 +0000 |
commit | 9d0f3c3a83276b0ce886fd6720fc8879f2add1b9 (patch) | |
tree | 99d4c05af369ca9d18f636e27520c62e6134082c | |
parent | fdc4eead7ce4685c9e14c8c2cb47157b8fb3cd22 (diff) | |
download | xine-lib-9d0f3c3a83276b0ce886fd6720fc8879f2add1b9.tar.gz xine-lib-9d0f3c3a83276b0ce886fd6720fc8879f2add1b9.tar.bz2 |
Fix handling of BUF_FLAG_FRAMERATE and BUF_FLAG_ASPECT
CVS patchset: 7601
CVS date: 2005/06/04 10:54:22
-rw-r--r-- | src/libffmpeg/video_decoder.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/video_decoder.c index 82d74ed6b..01ed89a0b 100644 --- a/src/libffmpeg/video_decoder.c +++ b/src/libffmpeg/video_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: video_decoder.c,v 1.51 2005/05/30 16:01:52 jstembridge Exp $ + * $Id: video_decoder.c,v 1.52 2005/06/04 10:54:22 jstembridge Exp $ * * xine video decoder plugin using ffmpeg * @@ -1231,21 +1231,23 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { ff_handle_header_buffer(this, buf); - } else { + } + + if (buf->decoder_flags & BUF_FLAG_FRAMERATE) { + this->video_step = buf->decoder_info[0]; + _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step); + } + + if (buf->decoder_flags & BUF_FLAG_ASPECT) { + this->aspect_ratio = (double)buf->decoder_info[1] / (double)buf->decoder_info[2]; + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, + this->aspect_ratio*10000); + } + + if (!(buf->decoder_flags & BUF_FLAG_HEADER)) { /* decode */ - if (buf->decoder_flags & BUF_FLAG_FRAMERATE) { - this->video_step = buf->decoder_info[0]; - _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step); - } - - if (buf->decoder_flags & BUF_FLAG_ASPECT) { - this->aspect_ratio = (double)buf->decoder_info[1] / (double)buf->decoder_info[2]; - _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, - this->aspect_ratio*10000); - } - /* aspect ratio */ if(!this->bih.biWidth || !this->bih.biHeight) { this->bih.biWidth = this->context->width; |