summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/dec_video.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-30 23:56:24 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-30 23:56:24 +0000
commit0446e090b1185e9773c77adad46bd5159acc8222 (patch)
tree04ba6c5b2e856501021a96ddc9a650cf5bf761f2 /libmpcodecs/dec_video.c
parentc1f2df8f53deced39e181ce8e6ef6aaa41256781 (diff)
downloadmpv-0446e090b1185e9773c77adad46bd5159acc8222.tar.bz2
mpv-0446e090b1185e9773c77adad46bd5159acc8222.tar.xz
Allow forcing of demuxers and codecs by prepending '+'
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16322 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r--libmpcodecs/dec_video.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 3e56a622f7..b25b1c7a8b 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -166,19 +166,24 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
unsigned int orig_fourcc=sh_video->bih?sh_video->bih->biCompression:0;
sh_video->codec=NULL;
sh_video->vf_inited=0;
+ int force = 0;
+ if (codecname && codecname[0] == '+') {
+ codecname = &codecname[1];
+ force = 1;
+ }
while(1){
int i;
// restore original fourcc:
if(sh_video->bih) sh_video->bih->biCompression=orig_fourcc;
- if(!(sh_video->codec=find_codec(sh_video->format,
+ if(!(sh_video->codec=find_video_codec(sh_video->format,
sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL,
- sh_video->codec,0) )) break;
+ sh_video->codec,force) )) break;
// ok we found one codec
if(sh_video->codec->flags&CODECS_FLAG_SELECTED) continue; // already tried & failed
if(codecname && strcmp(sh_video->codec->name,codecname)) continue; // -vc
if(vfm && strcmp(sh_video->codec->drv,vfm)) continue; // vfm doesn't match
- if(sh_video->codec->status<status) continue; // too unstable
+ if(!force && sh_video->codec->status<status) continue; // too unstable
sh_video->codec->flags|=CODECS_FLAG_SELECTED; // tagging it
// ok, it matches all rules, let's find the driver!
for (i=0; mpcodecs_vd_drivers[i] != NULL; i++)