Mercurial > mplayer.hg
changeset 35304:d29d116c0818
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.
author | al |
---|---|
date | Sat, 10 Nov 2012 13:29:36 +0000 |
parents | aad2bda4f65f |
children | caa2267e0cc6 |
files | etc/codecs.conf libmpcodecs/dec_audio.c libmpcodecs/dec_video.c |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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,
--- 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;