Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • Thrillseekr/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
393 results
Show changes
Commits on Source (10)
......@@ -537,8 +537,7 @@ VLC_API filter_t *filter_chain_AppendFilter(filter_chain_t *chain,
*
* \param chain filter chain to append a filter to
* \param fmt_out filter output format
* \retval 0 on success
* \retval -1 on failure
* \retval VLC_SUCCESS on success
*/
VLC_API int filter_chain_AppendConverter(filter_chain_t *chain,
const es_format_t *fmt_out);
......
......@@ -428,7 +428,7 @@ static int BuildFilterChain( filter_t *p_filter )
if( filter_chain_AppendConverter( p_sys->p_chain,
&fmt_mid ) != VLC_SUCCESS )
continue;
p_sys->p_video_filter =
filter_chain_AppendFilter( p_sys->p_chain,
p_filter->psz_name, p_filter->p_cfg,
......@@ -461,10 +461,12 @@ static int CreateChain( filter_t *p_filter, const es_format_t *p_fmt_mid )
filter_sys_t *p_sys = p_filter->p_sys;
filter_chain_Reset( p_sys->p_chain, &p_filter->fmt_in, p_filter->vctx_in, &p_filter->fmt_out );
if( filter_chain_AppendConverter( p_sys->p_chain, p_fmt_mid ) )
return VLC_EGENERIC;
int i_ret = filter_chain_AppendConverter( p_sys->p_chain, p_fmt_mid );
if ( i_ret != VLC_SUCCESS )
return i_ret;
if( filter_chain_AppendConverter( p_sys->p_chain, &p_filter->fmt_out ) )
i_ret = filter_chain_AppendConverter( p_sys->p_chain, &p_filter->fmt_out );
if ( i_ret != VLC_SUCCESS )
goto error;
p_filter->vctx_out = filter_chain_GetVideoCtxOut( p_sys->p_chain );
......
......@@ -673,11 +673,11 @@ Open_chain_CVPX(filter_t *filter)
/* Append intermediate CVPX chroma */
ret = filter_chain_AppendConverter(chain, &fmt_out);
if (ret != 0)
if (ret != VLC_SUCCESS)
goto error;
/* Append final chroma, either CVPX or software. */
ret = filter_chain_AppendConverter(chain, NULL);
if (ret != 0)
if (ret != VLC_SUCCESS)
goto error;
struct vlc_video_context *vctx_out =
......
......@@ -97,12 +97,12 @@ static int Open(filter_t *p_filter)
int ret;
ret = filter_chain_AppendConverter(p_chain, &fmt_intermediate);
if (ret != 0)
return VLC_EGENERIC;
if (ret != VLC_SUCCESS)
return ret;
ret = filter_chain_AppendConverter(p_chain, NULL);
if (ret != 0)
return VLC_EGENERIC;
if (ret != VLC_SUCCESS)
return ret;
p_filter->p_sys = p_chain;
p_filter->ops = &chain_ops;
......
......@@ -339,11 +339,12 @@ static int Activate( filter_t *p_filter )
filter_chain_Reset( p_sys->p_chain, &p_filter->fmt_in, p_filter->vctx_in, &fmt );
/* Append scaling module */
if ( filter_chain_AppendConverter( p_sys->p_chain, NULL ) )
int ret = filter_chain_AppendConverter( p_sys->p_chain, NULL );
if ( ret != VLC_SUCCESS )
{
msg_Err( p_filter, "Could not append scaling filter" );
free( p_sys );
return VLC_EGENERIC;
return ret;
}
/* Append croppadd module if we actually do cropping or padding instead of just scaling*/
......
......@@ -305,7 +305,7 @@ int filter_chain_AppendConverter( filter_chain_t *chain,
const es_format_t *fmt_out )
{
return filter_chain_AppendInner( chain, NULL, chain->conv_cap, NULL,
fmt_out ) != NULL ? 0 : -1;
fmt_out ) != NULL ? VLC_SUCCESS : VLC_EGENERIC;
}
void filter_chain_DeleteFilter( filter_chain_t *chain, filter_t *filter )
......
......@@ -338,10 +338,6 @@ subpicture_region_t* subpicture_region_Copy( subpicture_region_t *p_region_src )
p_region_dst->p_text = text_segment_Copy( p_region_src->p_text );
//Palette is already copied by subpicture_region_New, we just have to duplicate p_pixels
for (int i = 0; i < p_region_src->p_picture->i_planes; i++)
memcpy(p_region_dst->p_picture->p[i].p_pixels,
p_region_src->p_picture->p[i].p_pixels,
p_region_src->p_picture->p[i].i_lines * p_region_src->p_picture->p[i].i_pitch);
picture_CopyPixels(p_region_dst->p_picture, p_region_src->p_picture);
return p_region_dst;
}
......@@ -259,10 +259,8 @@ static picture_t *VideoBufferNew(filter_t *filter)
osys->display_fmt.i_width == fmt->i_width &&
osys->display_fmt.i_height == fmt->i_height);
picture_pool_t *pool = vout_GetPool(vd, 3);
if (!pool)
return NULL;
return picture_pool_Get(pool);
assert(picture_pool_GetSize(osys->pool) >= 3);
return picture_pool_Get(osys->pool);
}
static vlc_decoder_device * DisplayHoldDecoderDevice(vlc_object_t *o, void *sys)
......@@ -287,7 +285,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
osys->converters = filter_chain_NewVideo(vd, false, &owner);
if (unlikely(osys->converters == NULL))
return -1;
return VLC_ENOMEM;
video_format_t v_src = osys->source;
v_src.i_sar_num = 0;
......@@ -299,7 +297,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
const bool convert = memcmp(&v_src, &v_dst, sizeof(v_src)) != 0;
if (!convert)
return 0;
return VLC_SUCCESS;
msg_Dbg(vd, "A filter to adapt decoder %4.4s to display %4.4s is needed",
(const char *)&v_src.i_chroma, (const char *)&v_dst.i_chroma);
......@@ -317,7 +315,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
es_format_Clean(&dst);
es_format_Clean(&src);
if (ret != 0) {
if (ret != VLC_SUCCESS) {
msg_Err(vd, "Failed to adapt decoder format to display");
filter_chain_Delete(osys->converters);
osys->converters = NULL;
......@@ -475,21 +473,23 @@ static int vout_SetSourceAspect(vout_display_t *vd,
unsigned sar_num, unsigned sar_den)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
int ret = 0;
int err1, err2 = VLC_SUCCESS;
if (sar_num > 0 && sar_den > 0) {
osys->source.i_sar_num = sar_num;
osys->source.i_sar_den = sar_den;
}
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))
ret = -1;
err1 = vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT);
/* If a crop ratio is requested, recompute the parameters */
if (osys->crop.mode != VOUT_CROP_NONE && vout_UpdateSourceCrop(vd))
ret = -1;
if (osys->crop.mode != VOUT_CROP_NONE)
err2 = vout_UpdateSourceCrop(vd);
return ret;
if (err1 != VLC_SUCCESS)
return err1;
return err2;
}
void VoutFixFormatAR(video_format_t *fmt)
......@@ -532,7 +532,7 @@ void vout_UpdateDisplaySourceProperties(vout_display_t *vd, const video_format_t
err2 = vout_UpdateSourceCrop(vd);
}
if (err1 || err2)
if (err1 != VLC_SUCCESS || err2 != VLC_SUCCESS)
vout_display_Reset(vd);
}
......@@ -542,7 +542,7 @@ void vout_display_SetSize(vout_display_t *vd, unsigned width, unsigned height)
osys->cfg.display.width = width;
osys->cfg.display.height = height;
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE))
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE) != VLC_SUCCESS)
vout_display_Reset(vd);
}
......@@ -554,7 +554,7 @@ void vout_SetDisplayFitting(vout_display_t *vd, enum vlc_video_fitting fit)
return; /* nothing to do */
osys->cfg.display.fitting = fit;
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED))
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED) != VLC_SUCCESS)
vout_display_Reset(vd);
}
......@@ -571,7 +571,7 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
return; /* zoom has no effects */
if (onum * den == num * oden)
return; /* zoom has not changed */
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM))
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM) != VLC_SUCCESS)
vout_display_Reset(vd);
}
......@@ -589,7 +589,7 @@ void vout_SetDisplayAspect(vout_display_t *vd, unsigned dar_num, unsigned dar_de
sar_den = 0;
}
if (vout_SetSourceAspect(vd, sar_num, sar_den))
if (vout_SetSourceAspect(vd, sar_num, sar_den) != VLC_SUCCESS)
vout_display_Reset(vd);
}
......@@ -601,7 +601,7 @@ void vout_SetDisplayCrop(vout_display_t *vd,
if (!vout_CropEqual(crop, &osys->crop)) {
osys->crop = *crop;
if (vout_UpdateSourceCrop(vd))
if (vout_UpdateSourceCrop(vd) != VLC_SUCCESS)
vout_display_Reset(vd);
}
}
......
......@@ -896,7 +896,7 @@ static void ChangeFilters(vout_thread_sys_t *vout)
{
msg_Dbg(&vout->obj, "Adding a filter to compensate for format changes");
if (filter_chain_AppendConverter(sys->filter.chain_interactive,
&fmt_target) != 0) {
&fmt_target) != VLC_SUCCESS) {
msg_Err(&vout->obj, "Failed to compensate for the format changes, removing all filters");
DelAllFilterCallbacks(vout);
filter_chain_Reset(sys->filter.chain_static, &fmt_target, vctx_target, &fmt_target);
......@@ -1053,7 +1053,7 @@ static picture_t *ConvertRGB32AndBlend(vout_thread_sys_t *vout, picture_t *pic,
NULL /* TODO output video context of blender */,
&dst);
if (filter_chain_AppendConverter(filterc, &dst) != 0)
if (filter_chain_AppendConverter(filterc, &dst) != VLC_SUCCESS)
{
filter_chain_Delete(filterc);
return NULL;
......@@ -1210,7 +1210,7 @@ static int PrerenderPicture(vout_thread_sys_t *sys, picture_t *filtered,
{
/* Blending failed, likely because the picture is opaque or
* read-only. Try to convert the opaque picture to a
* software RGB32 one before blending it. */
* software RGB32 to generate a snapshot. */
if (do_snapshot)
{
picture_t *copy = ConvertRGB32AndBlend(sys, blent, subpic);
......@@ -1664,7 +1664,6 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
vlc_mutex_unlock(&sys->window_lock);
sys->decoder_fifo = picture_fifo_New();
sys->private.display_pool = NULL;
sys->private.private_pool = NULL;
sys->filter.configuration = NULL;
......@@ -1734,7 +1733,7 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
vout_SetDisplayAspect(sys->display, num, den);
vlc_queuedmutex_unlock(&sys->display_lock);
assert(sys->private.display_pool != NULL && sys->private.private_pool != NULL);
assert(sys->private.private_pool != NULL);
sys->displayed.current = NULL;
sys->displayed.decoded = NULL;
......@@ -1829,7 +1828,7 @@ static void vout_ReleaseDisplay(vout_thread_sys_t *vout)
filter_DeleteBlend(sys->spu_blend);
/* Destroy the rendering display */
if (sys->private.display_pool != NULL)
if (sys->private.private_pool != NULL)
vout_FlushUnlocked(vout, true, VLC_TICK_MAX);
vlc_queuedmutex_lock(&sys->display_lock);
......@@ -1860,7 +1859,7 @@ static void vout_ReleaseDisplay(vout_thread_sys_t *vout)
picture_fifo_Delete(sys->decoder_fifo);
sys->decoder_fifo = NULL;
}
assert(sys->private.display_pool == NULL);
assert(sys->private.private_pool == NULL);
vlc_mutex_lock(&sys->window_lock);
vout_display_window_SetMouseHandler(sys->display_cfg.window, NULL, NULL);
......
......@@ -29,14 +29,6 @@
typedef struct input_thread_t input_thread_t;
/* It should be high enough to absorbe jitter due to difficult picture(s)
* to decode but not too high as memory is not that cheap.
*
* It can be made lower at compilation time if needed, but performance
* may be degraded.
*/
#define VOUT_MAX_PICTURES (20)
/**
* Vout configuration
*/
......
......@@ -40,7 +40,6 @@ struct vout_thread_private_t
} interlacing;
picture_pool_t *private_pool;
picture_pool_t *display_pool;
};
/* */
......
......@@ -1946,6 +1946,10 @@ subpicture_t *spu_Render(spu_t *spu,
VLC_CODEC_YUVP,
0,
};
static_assert(ARRAY_SIZE(chroma_list_default_yuv) <= SPU_CHROMALIST_COUNT,
"YUV chroma list too large");
static_assert(ARRAY_SIZE(chroma_list_default_rgb) <= SPU_CHROMALIST_COUNT,
"RGB chroma list too large");
if (!chroma_list || *chroma_list == 0)
chroma_list = vlc_fourcc_IsYUV(fmt_dst->i_chroma) ? chroma_list_default_yuv
......
......@@ -52,6 +52,14 @@ static void VoutViewpointMoved(void *sys, const vlc_viewpoint_t *vp)
/* Minimum number of display picture */
#define DISPLAY_PICTURE_COUNT (1)
/* It should be high enough to absorb jitter due to difficult picture(s)
* to decode but not too high as memory is not that cheap.
*
* It can be made lower at compilation time if needed, but performance
* may be degraded.
*/
#define VOUT_MAX_PICTURES (20)
/*****************************************************************************
*
*****************************************************************************/
......@@ -81,8 +89,6 @@ vout_display_t *vout_OpenWrapper(vout_thread_t *vout, vout_thread_private_t *sys
if (vd == NULL)
return NULL;
sys->display_pool = NULL;
const unsigned private_picture = 4; /* XXX 3 for filter, 1 for SPU */
const unsigned kept_picture = 1; /* last displayed picture */
const unsigned reserved_picture = DISPLAY_PICTURE_COUNT +
......@@ -93,26 +99,18 @@ vout_display_t *vout_OpenWrapper(vout_thread_t *vout, vout_thread_private_t *sys
if (display_pool == NULL)
goto error;
#ifndef NDEBUG
if ( picture_pool_GetSize(display_pool) < reserved_picture )
msg_Warn(vout, "Not enough display buffers in the pool, requested %u got %u",
reserved_picture, picture_pool_GetSize(display_pool));
#endif
if (!vout_IsDisplayFiltered(vd) &&
picture_pool_GetSize(display_pool) >= reserved_picture) {
if (!vout_IsDisplayFiltered(vd)) {
sys->private_pool = picture_pool_Reserve(display_pool, private_picture);
} else {
sys->private_pool =
picture_pool_NewFromFormat(vd->source,
__MAX(VOUT_MAX_PICTURES,
reserved_picture - DISPLAY_PICTURE_COUNT));
private_picture + kept_picture));
}
if (sys->private_pool == NULL) {
picture_pool_Release(display_pool);
goto error;
}
sys->display_pool = display_pool;
#ifdef _WIN32
var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
......@@ -132,10 +130,10 @@ error:
*****************************************************************************/
void vout_CloseWrapper(vout_thread_t *vout, vout_thread_private_t *sys, vout_display_t *vd)
{
assert(sys->display_pool && sys->private_pool);
assert(sys->private_pool);
picture_pool_Release(sys->private_pool);
sys->display_pool = NULL;
sys->private_pool = NULL;
#ifdef _WIN32
var_DelCallback(vout, "video-wallpaper", Forward, vd);
......