summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-09-16 10:59:02 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-09-16 10:59:02 +0300
commit752c9d69932238731394c2b86c458b3213d85b97 (patch)
tree21f4b1f98f7e6d3edeb7c728d4f33038bae844b8
parentbccc0e0c620bea3e1a6ed502c7d53799ac35c180 (diff)
downloadxine-lib-752c9d69932238731394c2b86c458b3213d85b97.tar.gz
xine-lib-752c9d69932238731394c2b86c458b3213d85b97.tar.bz2
ffmpeg video: do not require preview buffers for mpeg1/2
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index eff673822..f9822723c 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -1095,6 +1095,11 @@ static void ff_handle_mpeg12_buffer (ff_video_decoder_t *this, buf_element_t *bu
lprintf("handle_mpeg12_buffer\n");
+ if (!this->is_mpeg12) {
+ /* initialize mpeg parser */
+ ff_init_mpeg12_mode(this);
+ }
+
while ((size > 0) || (flush == 1)) {
uint8_t *current;
@@ -1617,7 +1622,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (buf->pts)
this->pts = buf->pts;
- if (this->is_mpeg12) {
+ if ((buf->type & 0xFFFF0000) == BUF_VIDEO_MPEG) {
ff_handle_mpeg12_buffer(this, buf);
} else {
ff_handle_buffer(this, buf);