diff utils.c @ 177:53da914d6f46 libavcodec

avcodec_find_encoder_by_name() patch by Alex
author arpi_esp
date Sun, 23 Dec 2001 22:25:18 +0000
parents 7e263a256a6f
children e1bacfb3f51f
line wrap: on
line diff
--- a/utils.c	Sun Dec 16 12:44:34 2001 +0000
+++ b/utils.c	Sun Dec 23 22:25:18 2001 +0000
@@ -155,6 +155,18 @@
     return NULL;
 }
 
+AVCodec *avcodec_find_encoder_by_name(const char *name)
+{
+    AVCodec *p;
+    p = first_avcodec;
+    while (p) {
+        if (p->encode != NULL && strcmp(name,p->name) == 0)
+            return p;
+        p = p->next;
+    }
+    return NULL;
+}
+
 AVCodec *avcodec_find_decoder(enum CodecID id)
 {
     AVCodec *p;