From: Petri H. <phi...@us...> - 2011-09-28 08:49:14
|
# HG changeset patch # User Petri Hintukainen <phi...@us...> # Date 1317122892 -10800 # Node ID 5b021dbb282ca79f8d6afa54ea24d799ca6c0529 # Parent 371044c92c6e5b8a20cf7fa8028d57817f2c2202 Fixed mpeg2 decoding with ffmpeg. Codec was never opened when using mpeg12 mode. diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -521,17 +521,6 @@ static void init_postprocess (ff_video_d static int ff_handle_mpeg_sequence(ff_video_decoder_t *this, mpeg_parser_t *parser) { - /* - * init codec - */ - if (this->decoder_init_mode) { - _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, - "mpeg-1 (ffmpeg)"); - - init_video_codec (this, BUF_VIDEO_MPEG); - this->decoder_init_mode = 0; - } - /* frame format change */ if ((parser->width != this->bih.biWidth) || (parser->height != this->bih.biHeight) || @@ -908,10 +897,18 @@ static int ff_check_extradata(ff_video_d static void ff_init_mpeg12_mode(ff_video_decoder_t *this) { this->is_mpeg12 = 1; + + if (this->decoder_init_mode) { + _x_meta_info_set_utf8(this->stream, XINE_META_INFO_VIDEOCODEC, + "mpeg-1 (ffmpeg)"); + + init_video_codec (this, BUF_VIDEO_MPEG); + this->decoder_init_mode = 0; + } + 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; } } |