summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-26 09:31:21 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-26 09:31:21 +0000
commitf233d348212f5a634c91e45f93a7824a813ca050 (patch)
tree39f1d2e6bcb3df7bb892fa7cb55d06a32a99330e /libavdevice
parentfd867ffd432eb3da2403f6fb5e02e90ae4dadbc8 (diff)
Remove unnecessary temporary variable "frame_size" from
grab_read_header(). Originally committed as revision 16317 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/v4l.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index 6212955352..2b0ce0c7c7 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -70,7 +70,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
{
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(AVFormatContext *s1, AVFormatParameters *ap)
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(AVFormatContext *s1, AVFormatParameters *ap)
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: