diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-09-16 10:57:05 +0300 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-09-16 10:57:05 +0300 |
commit | bccc0e0c620bea3e1a6ed502c7d53799ac35c180 (patch) | |
tree | 3f9671ff29a3326be26f1b43543979e95a94a190 | |
parent | 58510bab3fc895edcd7b120689a001343fcf82f8 (diff) | |
download | xine-lib-bccc0e0c620bea3e1a6ed502c7d53799ac35c180.tar.gz xine-lib-bccc0e0c620bea3e1a6ed502c7d53799ac35c180.tar.bz2 |
Splitted ff_init_mpeg12_mode() from ff_handle_preview_buffer()
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index df57fd5f2..eff673822 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -905,6 +905,16 @@ static int ff_check_extradata(ff_video_decoder_t *this, unsigned int codec_type, return 1; } +static void ff_init_mpeg12_mode(ff_video_decoder_t *this) +{ + this->is_mpeg12 = 1; + if ( this->mpeg_parser == NULL ) { + this->mpeg_parser = calloc(1, sizeof(mpeg_parser_t)); + mpeg_parser_init(this->mpeg_parser); + this->decoder_init_mode = 0; + } +} + static void ff_handle_preview_buffer (ff_video_decoder_t *this, buf_element_t *buf) { int codec_type; @@ -912,12 +922,7 @@ static void ff_handle_preview_buffer (ff_video_decoder_t *this, buf_element_t *b codec_type = buf->type & 0xFFFF0000; if (codec_type == BUF_VIDEO_MPEG) { - this->is_mpeg12 = 1; - if ( this->mpeg_parser == NULL ) { - this->mpeg_parser = calloc(1, sizeof(mpeg_parser_t)); - mpeg_parser_init(this->mpeg_parser); - this->decoder_init_mode = 0; - } + ff_init_mpeg12_mode(this); } if (this->decoder_init_mode && !this->is_mpeg12) { |