diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-24 10:18:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-24 10:19:38 +0200 |
commit | 04916953584332b457a9485eee0724f33bbb9ba8 (patch) | |
tree | 6e58319c0e13456e79bdd4679031d6e59d8c83be /libavdevice | |
parent | 426abbb632b047a4eb93cd8de0ad482478e9a729 (diff) | |
download | ffmpeg-streaming-04916953584332b457a9485eee0724f33bbb9ba8.zip ffmpeg-streaming-04916953584332b457a9485eee0724f33bbb9ba8.tar.gz |
avdevice/fbdev_enc: avoid declaring variables in for()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/fbdev_enc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavdevice/fbdev_enc.c b/libavdevice/fbdev_enc.c index 9e76938..c3f8588 100644 --- a/libavdevice/fbdev_enc.c +++ b/libavdevice/fbdev_enc.c @@ -47,8 +47,9 @@ static av_cold int fbdev_write_header(AVFormatContext *h) enum AVPixelFormat pix_fmt; AVStream *st = NULL; int ret, flags = O_RDWR; + int i; - for (int i = 0; i < h->nb_streams; i++) { + for (i = 0; i < h->nb_streams; i++) { if (h->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (!st) { fbdev->index = i; @@ -117,6 +118,7 @@ static int fbdev_write_packet(AVFormatContext *h, AVPacket *pkt) int video_height = codec_ctx->height; int bytes_per_pixel = ((codec_ctx->bits_per_coded_sample + 7) >> 3); int src_line_size = video_width * bytes_per_pixel; + int i; if (fbdev->index != pkt->stream_index) return 0; @@ -175,7 +177,7 @@ static int fbdev_write_packet(AVFormatContext *h, AVPacket *pkt) } } - for (int i = 0; i < disp_height; i++) { + for (i = 0; i < disp_height; i++) { memcpy(pout, pin, bytes_to_copy); pout += fbdev->fixinfo.line_length; pin += src_line_size; |