changeset 530:c7219ac0b694 libavformat

10l
author michael
date Wed, 22 Sep 2004 21:25:09 +0000
parents 0b867ba59753
children 2af447b91329
files img2.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/img2.c	Wed Sep 22 20:01:56 2004 +0000
+++ b/img2.c	Wed Sep 22 21:25:09 2004 +0000
@@ -46,8 +46,9 @@
 
 static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
 {
-    while(*str && *str!='.') str++;
-    if(*str) str++;
+    str= strrchr(str, '.');
+    if(!str) return CODEC_ID_NONE;
+    str++;
 
     while (tags->id) {
         int i;