[FFmpeg-cvslog] r16317 - trunk/libavdevice/v4l.c

stefano subversion
Fri Dec 26 10:31:21 CET 2008


Author: stefano
Date: Fri Dec 26 10:31:21 2008
New Revision: 16317

Log:
Remove unnecessary temporary variable "frame_size" from
grab_read_header().

Modified:
   trunk/libavdevice/v4l.c

Modified: trunk/libavdevice/v4l.c
==============================================================================
--- trunk/libavdevice/v4l.c	Fri Dec 26 10:12:12 2008	(r16316)
+++ trunk/libavdevice/v4l.c	Fri Dec 26 10:31:21 2008	(r16317)
@@ -70,7 +70,7 @@ static int grab_read_header(AVFormatCont
 {
     VideoData *s = s1->priv_data;
     AVStream *st;
-    int video_fd, frame_size;
+    int video_fd;
     int desired_palette, desired_depth;
     struct video_tuner tuner;
     struct video_audio audio;
@@ -230,7 +230,7 @@ static int grab_read_header(AVFormatCont
 
     for (j = 0; j < vformat_num; j++) {
         if (s->frame_format == video_formats[j].palette) {
-            frame_size = s->video_win.width * s->video_win.height * video_formats[j].depth / 8;
+            s->frame_size = s->video_win.width * s->video_win.height * video_formats[j].depth / 8;
             st->codec->pix_fmt = video_formats[j].pix_fmt;
             break;
         }
@@ -240,14 +240,13 @@ static int grab_read_header(AVFormatCont
         goto fail;
 
     s->fd = video_fd;
-    s->frame_size = frame_size;
 
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_RAWVIDEO;
     st->codec->width = s->video_win.width;
     st->codec->height = s->video_win.height;
     st->codec->time_base = s->time_base;
-    st->codec->bit_rate = frame_size * 1/av_q2d(st->codec->time_base) * 8;
+    st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;
 
     return 0;
  fail:




More information about the ffmpeg-cvslog mailing list