Commit 666800bc authored by Laurent Aimar's avatar Laurent Aimar

* ffmpeg: --ffmpeg-truncated is now an int :

  * -1 -> CODEC_FLAG_TRUNCATED is set only if width == height == 0 (only TS should produce this)
  * 0  -> disable CODEC_FLAG_TRUNCATED
  * 1  -> force CODEC_FLAG_TRUNCATED
parent ec48ad6c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library * ffmpeg.c: video decoder using ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.34 2003/05/07 00:28:38 fenrir Exp $ * $Id: ffmpeg.c,v 1.35 2003/05/07 15:44:59 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -164,7 +164,7 @@ vlc_module_begin(); ...@@ -164,7 +164,7 @@ vlc_module_begin();
add_integer ( "ffmpeg-workaround-bugs", 1, NULL, add_integer ( "ffmpeg-workaround-bugs", 1, NULL,
"workaround bugs", WORKAROUND_BUGS_LONGTEXT, VLC_FALSE ); "workaround bugs", WORKAROUND_BUGS_LONGTEXT, VLC_FALSE );
add_bool( "ffmpeg-hurry-up", 0, NULL, "hurry up", HURRY_UP_LONGTEXT, VLC_FALSE ); add_bool( "ffmpeg-hurry-up", 0, NULL, "hurry up", HURRY_UP_LONGTEXT, VLC_FALSE );
add_bool( "ffmpeg-truncated", VLC_FALSE, NULL, "truncated stream", "truncated stream", VLC_FALSE ); add_integer( "ffmpeg-truncated", -1, NULL, "truncated stream", "truncated stream -1:auto,0:disable,:1:enable", VLC_FALSE );
add_category_hint( N_("Post processing"), NULL, VLC_FALSE ); add_category_hint( N_("Post processing"), NULL, VLC_FALSE );
add_integer( "ffmpeg-pp-q", 0, NULL, add_integer( "ffmpeg-pp-q", 0, NULL,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video.c: video decoder using ffmpeg library * video.c: video decoder using ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.25 2003/05/07 00:28:38 fenrir Exp $ * $Id: video.c,v 1.26 2003/05/07 15:44:59 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -197,6 +197,8 @@ static vout_thread_t *ffmpeg_CreateVout( vdec_thread_t *p_vdec, ...@@ -197,6 +197,8 @@ static vout_thread_t *ffmpeg_CreateVout( vdec_thread_t *p_vdec,
int E_( InitThread_Video )( vdec_thread_t *p_vdec ) int E_( InitThread_Video )( vdec_thread_t *p_vdec )
{ {
int i_tmp; int i_tmp;
int i_truncated;
p_vdec->p_ff_pic = avcodec_alloc_frame(); p_vdec->p_ff_pic = avcodec_alloc_frame();
if( ( p_vdec->p_format = (BITMAPINFOHEADER *)p_vdec->p_fifo->p_bitmapinfoheader) != NULL ) if( ( p_vdec->p_format = (BITMAPINFOHEADER *)p_vdec->p_fifo->p_bitmapinfoheader) != NULL )
...@@ -232,7 +234,9 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec ) ...@@ -232,7 +234,9 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec )
/* FIXME search real LIBAVCODEC_BUILD */ /* FIXME search real LIBAVCODEC_BUILD */
#if LIBAVCODEC_BUILD >= 4662 #if LIBAVCODEC_BUILD >= 4662
if( config_GetInt( p_vdec->p_fifo, "ffmpeg-truncated" ) && ( p_vdec->p_codec->capabilities & CODEC_CAP_TRUNCATED ) ) i_truncated = config_GetInt( p_vdec->p_fifo, "ffmpeg-truncated" );
if( i_truncated == 1 ||
( i_truncated == -1 && ( p_vdec->p_context->width == 0 || p_vdec->p_context->height == 0 ) ) )
{ {
p_vdec->p_context->flags |= CODEC_FLAG_TRUNCATED; p_vdec->p_context->flags |= CODEC_FLAG_TRUNCATED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment