diff img2.c @ 885:da1d5db0ce5c libavformat

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents 0152b49ef2a5
children edbe5c3717f9
line wrap: on
line diff
--- a/img2.c	Sat Dec 17 17:57:03 2005 +0000
+++ b/img2.c	Sat Dec 17 18:14:38 2005 +0000
@@ -99,7 +99,7 @@
 }
 
 /* return -1 if no image found */
-static int find_image_range(int *pfirst_index, int *plast_index, 
+static int find_image_range(int *pfirst_index, int *plast_index,
                             const char *path)
 {
     char buf[1024];
@@ -108,7 +108,7 @@
     /* find the first image */
     for(first_index = 0; first_index < 5; first_index++) {
         if (get_frame_filename(buf, sizeof(buf), path, first_index) < 0){
-            *pfirst_index = 
+            *pfirst_index =
             *plast_index = 1;
             return 0;
         }
@@ -117,7 +117,7 @@
     }
     if (first_index == 5)
         goto fail;
-    
+
     /* find the last image */
     last_index = first_index;
     for(;;) {
@@ -127,7 +127,7 @@
                 range1 = 1;
             else
                 range1 = 2 * range;
-            if (get_frame_filename(buf, sizeof(buf), path, 
+            if (get_frame_filename(buf, sizeof(buf), path,
                                    last_index + range1) < 0)
                 goto fail;
             if (!url_exist(buf))
@@ -178,7 +178,7 @@
     pstrcpy(s->path, sizeof(s->path), s1->filename);
     s->img_number = 0;
     s->img_count = 0;
-    
+
     /* find format */
     if (s1->iformat->flags & AVFMT_NOFILE)
         s->is_pipe = 0;
@@ -186,18 +186,18 @@
         s->is_pipe = 1;
         st->need_parsing= 1;
     }
-        
+
     if (!ap || !ap->time_base.num) {
         av_set_pts_info(st, 60, 1, 25);
     } else {
         av_set_pts_info(st, 60, ap->time_base.num, ap->time_base.den);
     }
-    
+
     if(ap && ap->width && ap->height){
         st->codec->width = ap->width;
         st->codec->height= ap->height;
     }
-    
+
     if (!s->is_pipe) {
         if (find_image_range(&first_index, &last_index, s->path) < 0)
             return AVERROR_IO;
@@ -208,7 +208,7 @@
         st->start_time = 0;
         st->duration = last_index - first_index + 1;
     }
-    
+
     if(ap->video_codec_id){
         st->codec->codec_type = CODEC_TYPE_VIDEO;
         st->codec->codec_id = ap->video_codec_id;
@@ -246,12 +246,12 @@
             if (url_fopen(f[i], filename, URL_RDONLY) < 0)
                 return AVERROR_IO;
             size[i]= url_fsize(f[i]);
-            
+
             if(codec->codec_id != CODEC_ID_RAWVIDEO)
                 break;
             filename[ strlen(filename) - 1 ]= 'U' + i;
         }
-        
+
         if(codec->codec_id == CODEC_ID_RAWVIDEO && !codec->width)
             infer_size(&codec->width, &codec->height, size[0]);
     } else {
@@ -306,7 +306,7 @@
         img->is_pipe = 0;
     else
         img->is_pipe = 1;
-        
+
     return 0;
 }
 
@@ -319,13 +319,13 @@
     int i;
 
     if (!img->is_pipe) {
-        if (get_frame_filename(filename, sizeof(filename), 
+        if (get_frame_filename(filename, sizeof(filename),
                                img->path, img->img_number) < 0 && img->img_number>1)
             return AVERROR_IO;
         for(i=0; i<3; i++){
             if (url_fopen(pb[i], filename, URL_WRONLY) < 0)
                 return AVERROR_IO;
-        
+
             if(codec->codec_id != CODEC_ID_RAWVIDEO)
                 break;
             filename[ strlen(filename) - 1 ]= 'U' + i;
@@ -333,7 +333,7 @@
     } else {
         pb[0] = &s->pb;
     }
-    
+
     if(codec->codec_id == CODEC_ID_RAWVIDEO){
         int ysize = codec->width * codec->height;
         put_buffer(pb[0], pkt->data        , ysize);
@@ -423,6 +423,6 @@
 
     av_register_input_format(&image2pipe_iformat);
     av_register_output_format(&image2pipe_oformat);
-    
+
     return 0;
 }