diff options
-rw-r--r-- | src/demuxers/demux_real.c | 9 | ||||
-rw-r--r-- | src/libffmpeg/video_decoder.c | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 60f170ce8..75d125bcf 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -31,7 +31,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.100 2004/06/13 21:28:54 miguelfreitas Exp $ + * $Id: demux_real.c,v 1.101 2004/07/30 19:08:47 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1224,7 +1224,12 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { (buf->decoder_flags & BUF_FLAG_FRAME_START)) pts = (int64_t) real_fix_timestamp(this, buf->content, timestamp) * 90; - buf->pts = pts; + /* this test was moved from ffmpeg video decoder. + * fixme: is pts only valid on frame start? */ + if( buf->decoder_flags & BUF_FLAG_FRAME_START ) + buf->pts = pts; + else + buf->pts = 0; pts = 0; buf->extra_info->input_normpos = normpos; diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/video_decoder.c index 1d74ec998..c1e698380 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.23 2004/07/20 21:38:34 tmattern Exp $ + * $Id: video_decoder.c,v 1.24 2004/07/30 19:08:48 miguelfreitas Exp $ * * xine video decoder plugin using ffmpeg * @@ -855,9 +855,7 @@ 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; - else if (this->is_mpeg12 && buf->pts) + if (buf->pts) this->pts = buf->pts; if ((this->decoder_ok && this->size) || this->is_mpeg12) { |