diff options
author | clang-format <noreply@google.com> | 2016-07-18 19:44:59 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2016-07-19 14:34:19 -0700 |
commit | 033dab9ca0adb78a0ce417d5956a6caf440c7ca7 (patch) | |
tree | be50ddb1a5235d4d3b6e5921a69f0cffd2579365 /video_reader.c | |
parent | 6e336f6e5f623929018c2db84472f1b2f5d67a85 (diff) | |
download | libvpx-033dab9ca0adb78a0ce417d5956a6caf440c7ca7.tar.gz |
top-level: apply clang-format
Change-Id: Ibd5395bf8956a80f7c0df4d539c7a42c927a1fc7
Diffstat (limited to 'video_reader.c')
-rw-r--r-- | video_reader.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/video_reader.c b/video_reader.c index 39c7edba1..a0ba2521c 100644 --- a/video_reader.c +++ b/video_reader.c @@ -30,21 +30,17 @@ VpxVideoReader *vpx_video_reader_open(const char *filename) { char header[32]; VpxVideoReader *reader = NULL; FILE *const file = fopen(filename, "rb"); - if (!file) - return NULL; // Can't open file + if (!file) return NULL; // Can't open file - if (fread(header, 1, 32, file) != 32) - return NULL; // Can't read file header + if (fread(header, 1, 32, file) != 32) return NULL; // Can't read file header if (memcmp(kIVFSignature, header, 4) != 0) return NULL; // Wrong IVF signature - if (mem_get_le16(header + 4) != 0) - return NULL; // Wrong IVF version + if (mem_get_le16(header + 4) != 0) return NULL; // Wrong IVF version reader = calloc(1, sizeof(*reader)); - if (!reader) - return NULL; // Can't allocate VpxVideoReader + if (!reader) return NULL; // Can't allocate VpxVideoReader reader->file = file; reader->info.codec_fourcc = mem_get_le32(header + 8); @@ -71,8 +67,7 @@ int vpx_video_reader_read_frame(VpxVideoReader *reader) { const uint8_t *vpx_video_reader_get_frame(VpxVideoReader *reader, size_t *size) { - if (size) - *size = reader->frame_size; + if (size) *size = reader->frame_size; return reader->buffer; } @@ -80,4 +75,3 @@ const uint8_t *vpx_video_reader_get_frame(VpxVideoReader *reader, const VpxVideoInfo *vpx_video_reader_get_info(VpxVideoReader *reader) { return &reader->info; } - |