mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-29 06:20:29 +00:00
ffmpeg: fix non ANSI C for(int
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
484e59a0a0
commit
a45880dcdb
4
ffmpeg.c
4
ffmpeg.c
@ -463,7 +463,7 @@ static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf)
|
|||||||
{
|
{
|
||||||
AVCodecContext *s = ist->st->codec;
|
AVCodecContext *s = ist->st->codec;
|
||||||
FrameBuffer *buf = av_mallocz(sizeof(*buf));
|
FrameBuffer *buf = av_mallocz(sizeof(*buf));
|
||||||
int ret;
|
int ret, i;
|
||||||
const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1;
|
const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1;
|
||||||
int h_chroma_shift, v_chroma_shift;
|
int h_chroma_shift, v_chroma_shift;
|
||||||
int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1
|
int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1
|
||||||
@ -491,7 +491,7 @@ static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf)
|
|||||||
memset(buf->base[0], 128, ret);
|
memset(buf->base[0], 128, ret);
|
||||||
|
|
||||||
avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
|
avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
|
||||||
for (int i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
||||||
const int h_shift = i==0 ? 0 : h_chroma_shift;
|
const int h_shift = i==0 ? 0 : h_chroma_shift;
|
||||||
const int v_shift = i==0 ? 0 : v_chroma_shift;
|
const int v_shift = i==0 ? 0 : v_chroma_shift;
|
||||||
if (s->flags & CODEC_FLAG_EMU_EDGE)
|
if (s->flags & CODEC_FLAG_EMU_EDGE)
|
||||||
|
Loading…
Reference in New Issue
Block a user