summaryrefslogtreecommitdiff
path: root/src/libffmpeg/xine_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/xine_decoder.c')
-rw-r--r--src/libffmpeg/xine_decoder.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index a50d72f41..90165b3b3 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_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: xine_decoder.c,v 1.46 2002/07/05 17:32:03 mroi Exp $
+ * $Id: xine_decoder.c,v 1.47 2002/07/05 20:54:37 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -58,6 +58,7 @@ typedef struct ff_decoder_s {
int bufsize;
int size;
int skipframes;
+ int illegal_vlc;
AVPicture av_picture;
AVCodecContext context;
@@ -175,6 +176,13 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->decoder_ok = 1;
this->video_out->open (this->video_out);
+ /* needed to play streams generated by MS ISO MPEG4 codec.
+ Michael Niedermayer explained:
+ M$ "ISO MPEG4" uses illegal vlc code combinations, a ISO MPEG4 compliant
+ decoder which support error resilience should handle them like errors.
+ */
+ if( this->illegal_vlc )
+ this->context.error_resilience=-1;
if( this->buf )
free( this->buf );
@@ -424,6 +432,9 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = ff_dispose;
this->size = 0;
+ this->illegal_vlc = xine->config->register_bool (xine->config, "codec.ffmpeg_illegal_vlc", 1,
+ _("allow illegal vlc codes in mpeg4 streams"), NULL, NULL, NULL);
+
pthread_once( &once_control, init_routine );
return (video_decoder_t *) this;