summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2003-06-13 23:53:11 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2003-06-13 23:53:11 +0000
commitf734684d42746b755789cacf31813e4e9c9093f4 (patch)
tree884b8be04da46551669ca8af1ab88dea6a28bfa3 /src
parent2e6e8eabee65425e2d0a9f45d0bf2b224c6b8406 (diff)
downloadxine-lib-f734684d42746b755789cacf31813e4e9c9093f4.tar.gz
xine-lib-f734684d42746b755789cacf31813e4e9c9093f4.tar.bz2
- fix sync problem with ffmpeg audio decoder
w32dll extract the pts from the first packet of a frame ffmpeg extract the pts from the last one CVS patchset: 5041 CVS date: 2003/06/13 23:53:11
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_asf.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 928c8f97d..1c6ebd7ca 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.122 2003/06/13 20:46:22 tmattern Exp $
+ * $Id: demux_asf.c,v 1.123 2003/06/13 23:53:11 tmattern Exp $
*
* demultiplexer for asf streams
*
@@ -677,7 +677,6 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
buf_element_t *buf;
int bufsize;
int package_done;
- int send_ts = 1;
#ifdef LOG
printf ("demux_asf: asf_send_buffer_nodefrag: timestamp=%lld, pts=%lld\n", timestamp, timestamp * 90);
@@ -726,12 +725,7 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
buf->extra_info->input_time);
#endif
- if (send_ts) {
- buf->pts = timestamp * 90;
- send_ts = 0;
- } else {
- buf->pts = 0;
- }
+ buf->pts = timestamp * 90;
buf->type = stream->buf_type;
buf->size = bufsize;
timestamp = 0;
@@ -823,11 +817,10 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream,
/* tm: not needed */
buf->pts = stream->timestamp * 90 + stream->ts_per_kbyte *
(p-stream->buffer) / 1024;
+
#endif
- if (p == stream->buffer)
- buf->pts = stream->timestamp * 90;
- else
- buf->pts = 0;
+ /* send the same pts for the entire frame */
+ buf->pts = stream->timestamp * 90;
buf->type = stream->buf_type;
buf->size = bufsize;