summaryrefslogtreecommitdiff
path: root/libavformat/yuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/yuv.c')
-rw-r--r--libavformat/yuv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/yuv.c b/libavformat/yuv.c
index c4bce68b29..04f6f0c679 100644
--- a/libavformat/yuv.c
+++ b/libavformat/yuv.c
@@ -53,7 +53,7 @@ static int yuv_read(ByteIOContext *f,
int size;
URLContext *h;
AVImageInfo info1, *info = &info1;
-
+
img_size = url_fsize(f);
/* XXX: hack hack */
@@ -64,26 +64,26 @@ static int yuv_read(ByteIOContext *f,
return AVERROR_IO;
}
info->pix_fmt = PIX_FMT_YUV420P;
-
+
ret = alloc_cb(opaque, info);
if (ret)
return ret;
-
+
size = info->width * info->height;
-
+
p = strrchr(fname, '.');
if (!p || p[1] != 'Y')
return AVERROR_IO;
get_buffer(f, info->pict.data[0], size);
-
+
p[1] = 'U';
if (url_fopen(pb, fname, URL_RDONLY) < 0)
return AVERROR_IO;
get_buffer(pb, info->pict.data[1], size / 4);
url_fclose(pb);
-
+
p[1] = 'V';
if (url_fopen(pb, fname, URL_RDONLY) < 0)
return AVERROR_IO;
@@ -101,7 +101,7 @@ static int yuv_write(ByteIOContext *pb2, AVImageInfo *info)
uint8_t *ptr;
URLContext *h;
static const char *ext = "YUV";
-
+
/* XXX: hack hack */
h = url_fileno(pb2);
url_get_filename(h, fname, sizeof(fname));
@@ -127,7 +127,7 @@ static int yuv_write(ByteIOContext *pb2, AVImageInfo *info)
} else {
pb = pb2;
}
-
+
ptr = info->pict.data[i];
for(j=0;j<height;j++) {
put_buffer(pb, ptr, width);
@@ -140,7 +140,7 @@ static int yuv_write(ByteIOContext *pb2, AVImageInfo *info)
}
return 0;
}
-
+
static int yuv_probe(AVProbeData *pd)
{
if (match_ext(pd->filename, "Y"))