summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-03-17 19:11:09 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-03-17 19:11:09 +0000
commitf34031f57bc6c649accc40930db2b5a86af8a5de (patch)
treea173d56b535557fa738861a16ada179295114691 /src
parentcb3bc4bf84d1c85ce49e84646cb949d89d382807 (diff)
downloadxine-lib-f34031f57bc6c649accc40930db2b5a86af8a5de.tar.gz
xine-lib-f34031f57bc6c649accc40930db2b5a86af8a5de.tar.bz2
make ffmpeg recognize asf frame rate hints, small asf demuxer fixes
CVS patchset: 1580 CVS date: 2002/03/17 19:11:09
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_asf.c14
-rw-r--r--src/libffmpeg/xine_decoder.c5
2 files changed, 14 insertions, 5 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 2c7bfaa14..c244d62a1 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.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: demux_asf.c,v 1.27 2002/03/17 14:34:06 guenter Exp $
+ * $Id: demux_asf.c,v 1.28 2002/03/17 19:11:09 guenter Exp $
*
* demultiplexer for asf streams
*
@@ -444,8 +444,7 @@ static int asf_read_header (demux_asf_t *this) {
end_time = get_le64 (this);
this->length = get_le64(this) / 10000000;
- if ( (this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE)
- && (this->length) )
+ if (this->length)
this->rate = this->input->get_length (this->input) / this->length;
else
this->rate = 0;
@@ -725,6 +724,13 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
buf->input_pos = 0 ;
buf->input_time = 0 ;
}
+
+#ifdef LOG
+ printf ("demux_asf: input pos is %lld, input time is %d\n",
+ buf->input_pos,
+ buf->input_time);
+#endif
+
buf->pts = timestamp * 90;
if (buf->pts && this->send_discontinuity) {
@@ -745,7 +751,7 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
if ( (buf->type & BUF_MAJOR_MASK) == BUF_VIDEO_BASE) {
if (buf->pts && this->last_video_pts)
this->frame_duration = (3*this->frame_duration + (buf->pts - this->last_video_pts)) / 4;
-
+
/*
printf ("demux_asf: frame_duration is %d\n", this->frame_duration);
*/
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index d1cc5f602..c03da5188 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.27 2002/03/11 12:31:25 guenter Exp $
+ * $Id: xine_decoder.c,v 1.28 2002/03/17 19:11:10 guenter Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -230,6 +230,9 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
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) {
vo_frame_t *img;