changeset 21:3d2d2f8725f9 libavformat

jpeg detection fix - fixed imagepipe output
author bellard
date Sat, 11 Jan 2003 05:33:35 +0000
parents 3d52de18ecc3
children 65433f1b2549
files img.c utils.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/img.c	Sat Jan 11 05:02:14 2003 +0000
+++ b/img.c	Sat Jan 11 05:33:35 2003 +0000
@@ -47,7 +47,7 @@
 
 static int image_probe(AVProbeData *p)
 {
-    if (filename_number_test(p->filename) >= 0)
+    if (filename_number_test(p->filename) >= 0 && guess_image_format(p->filename))
         return AVPROBE_SCORE_MAX;
     else
         return 0;
@@ -358,7 +358,7 @@
     img_write_header,
     img_write_packet,
     img_write_trailer,
-    AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
+    AVFMT_RAWPICTURE,
     img_set_parameters,
 };
 
--- a/utils.c	Sat Jan 11 05:02:14 2003 +0000
+++ b/utils.c	Sat Jan 11 05:33:35 2003 +0000
@@ -86,7 +86,9 @@
     int score_max, score;
 
     /* specific test for image sequences */
-    if (!short_name && filename && filename_number_test(filename) >= 0) {
+    if (!short_name && filename && 
+        filename_number_test(filename) >= 0 &&
+        guess_image_format(filename)) {
         return guess_format("image", NULL, NULL);
     }