# HG changeset patch # User al # Date 1352554176 0 # Node ID d29d116c0818cd4d26b169b4fdf5d00c4275aa44 # Parent aad2bda4f65f80dff9b902525a5199e783adeb24 libmpcodecs: Only choose dummy codecs if forced Allows dummy codecs to have status working while still not being selected in cases where the user does not use -vc/-ac to force particular codecs. Additionally switch dummy codecs null and black to working now. diff -r aad2bda4f65f -r d29d116c0818 etc/codecs.conf --- a/etc/codecs.conf Sat Nov 10 13:29:26 2012 +0000 +++ b/etc/codecs.conf Sat Nov 10 13:29:36 2012 +0000 @@ -4216,7 +4216,7 @@ videocodec null info "NULL codec (no decoding!)" - status crashing + status working comment "for unknown/unsupported codecs or testing" driver null flags dummy @@ -4229,7 +4229,7 @@ videocodec black info "black codec (no decoding just output black frames!)" - status crashing + status working comment "for unknown/unsupported codecs or testing" driver black flags dummy diff -r aad2bda4f65f -r d29d116c0818 libmpcodecs/dec_audio.c --- a/libmpcodecs/dec_audio.c Sat Nov 10 13:29:26 2012 +0000 +++ b/libmpcodecs/dec_audio.c Sat Nov 10 13:29:36 2012 +0000 @@ -221,6 +221,11 @@ sh_audio->codec->name, sh_audio->codec->drv); continue; } + /* only allow dummy codecs if specified via -ac */ + if (sh_audio->codec->flags & CODECS_FLAG_DUMMY && !codecname) { + continue; + } + // it's available, let's try to init! // init() mp_msg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_OpeningAudioDecoder, diff -r aad2bda4f65f -r d29d116c0818 libmpcodecs/dec_video.c --- a/libmpcodecs/dec_video.c Sat Nov 10 13:29:26 2012 +0000 +++ b/libmpcodecs/dec_video.c Sat Nov 10 13:29:36 2012 +0000 @@ -283,6 +283,11 @@ sh_video->codec->name, sh_video->codec->drv); continue; } + /* only allow dummy codecs if specified via -vc */ + if (sh_video->codec->flags & CODECS_FLAG_DUMMY && !codecname) { + continue; + } + orig_w = sh_video->bih ? sh_video->bih->biWidth : sh_video->disp_w; orig_h = sh_video->bih ? sh_video->bih->biHeight : sh_video->disp_h; sh_video->disp_w = orig_w;