summaryrefslogtreecommitdiff
path: root/src/libxinevdec/yuv.c
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2004-02-09 22:04:11 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2004-02-09 22:04:11 +0000
commit37b34df0b811fbd7e0a4b39dd4a7fe2fd3e37756 (patch)
treeb72f943db9e7a45c28d8673859c88be1030e5b19 /src/libxinevdec/yuv.c
parentf32ff1b1bdf6d7362e254e6a53e1efe8f51d0547 (diff)
downloadxine-lib-37b34df0b811fbd7e0a4b39dd4a7fe2fd3e37756.tar.gz
xine-lib-37b34df0b811fbd7e0a4b39dd4a7fe2fd3e37756.tar.bz2
Only read frame duration when BUF_FLAG_FRAMERATE is set
CVS patchset: 6125 CVS date: 2004/02/09 22:04:11
Diffstat (limited to 'src/libxinevdec/yuv.c')
-rw-r--r--src/libxinevdec/yuv.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index 2db40d293..f9aa79274 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -21,7 +21,7 @@
* Actually, this decoder just reorganizes chunks of raw YUV data in such
* a way that xine can display them.
*
- * $Id: yuv.c,v 1.29 2004/01/12 17:35:19 miguelfreitas Exp $
+ * $Id: yuv.c,v 1.30 2004/02/09 22:04:11 jstembridge Exp $
*/
#include <stdio.h>
@@ -86,6 +86,11 @@ static void yuv_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_PREVIEW)
return;
+ 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_STDHEADER) { /* need to initialize */
this->stream->video_out->open (this->stream->video_out, this->stream);
@@ -96,9 +101,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
- this->video_step = buf->decoder_info[1];
-
- this->progressive = buf->decoder_info[0];
+ this->progressive = buf->decoder_info[1];
this->top_field_first = buf->decoder_info[2];
if(buf->decoder_info[3] && buf->decoder_info[4])
@@ -135,8 +138,6 @@ static void yuv_decode_data (video_decoder_t *this_gen,
}
- _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
-
return;
} else if (this->decoder_ok && !(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
@@ -149,9 +150,6 @@ static void yuv_decode_data (video_decoder_t *this_gen,
this->size += buf->size;
- if (buf->decoder_flags & BUF_FLAG_FRAMERATE)
- this->video_step = buf->decoder_info[0];
-
if (buf->decoder_flags & BUF_FLAG_FRAME_END) {
if (buf->type == BUF_VIDEO_YV12) {