summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2004-07-01 20:16:24 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2004-07-01 20:16:24 +0000
commit30b610e59910c1d116a4f851c6c94ebca7cfa9f9 (patch)
treef4fddcf543e1557e46c607e5fec3675872a25159 /src
parent1c21f84c511d1349edf0c71f841c566f8616055c (diff)
downloadxine-lib-30b610e59910c1d116a4f851c6c94ebca7cfa9f9.tar.gz
xine-lib-30b610e59910c1d116a4f851c6c94ebca7cfa9f9.tar.bz2
Fix av sync for RV10 and RV20 streams
CVS patchset: 6761 CVS date: 2004/07/01 20:16:24
Diffstat (limited to 'src')
-rw-r--r--src/libffmpeg/video_decoder.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/video_decoder.c
index c7c40fd21..87bc67b13 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.19 2004/06/28 22:44:57 tmattern Exp $
+ * $Id: video_decoder.c,v 1.20 2004/07/01 20:16:24 jstembridge Exp $
*
* xine video decoder plugin using ffmpeg
*
@@ -72,6 +72,7 @@ struct ff_video_decoder_s {
ff_video_class_t *class;
xine_stream_t *stream;
+ int64_t pts;
int video_step;
int decoder_ok;
@@ -915,13 +916,6 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->bih.biWidth = BE_16(&buf->content[12]);
this->bih.biHeight = BE_16(&buf->content[14]);
- this->video_step =
- 90000.0 / ((double) BE_16(&buf->content[22]) +
- ((double) BE_16(&buf->content[24]) / 65536.0));
-
- _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
- this->video_step);
-
this->context->sub_id = BE_32(&buf->content[30]);
this->context->slice_offset = xine_xmalloc(sizeof(int)*SLICE_OFFSET_SIZE);
@@ -1010,6 +1004,9 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->aspect_ratio*10000);
}
+ if (buf->decoder_flags & BUF_FLAG_FRAME_START)
+ this->pts = buf->pts;
+
if (this->decoder_ok && this->size) {
if ( (buf->decoder_flags & BUF_FLAG_FRAME_END) || this->is_continous ) {
@@ -1162,8 +1159,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
}
}
- img->pts = buf->pts;
- buf->pts = 0;
+ img->pts = this->pts;
+ this->pts = 0;
img->duration = this->video_step;
this->skipframes = img->draw(img, this->stream);