summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2009-03-28 20:51:33 +0100
committerReinhard Nißl <rnissl@gmx.de>2009-03-28 20:51:33 +0100
commitcc330f2e604bacd33d1d3900fb6bc4301147c0a4 (patch)
tree266c0deb6a0f36f632c0d02fc39cc12c0a81142c
parent7b0c3fd46c12613ffcc987183ffe13205bbbef82 (diff)
downloadxine-lib-cc330f2e604bacd33d1d3900fb6bc4301147c0a4.tar.gz
xine-lib-cc330f2e604bacd33d1d3900fb6bc4301147c0a4.tar.bz2
Report frame duration changes.
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index c272bc91a..adeef2c82 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -91,6 +91,7 @@ struct ff_video_decoder_s {
int pts_tag_stable_counter;
#endif /* AVCODEC_HAS_REORDERED_OPAQUE */
int video_step;
+ int reported_video_step;
uint8_t decoder_ok:1;
uint8_t decoder_init_mode:1;
@@ -1381,7 +1382,10 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) {
/* fallback to the VIDEO_PTS_MODE */
video_step_to_use = 0;
}
-
+
+ if (video_step_to_use && video_step_to_use != this->reported_video_step)
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, (this->reported_video_step = video_step_to_use));
+
if (this->av_frame->repeat_pict)
img->duration = video_step_to_use * 3 / 2;
else
@@ -1445,7 +1449,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, (this->reported_video_step = this->video_step));
}
if (buf->decoder_flags & BUF_FLAG_PREVIEW) {