summaryrefslogtreecommitdiff
path: root/vpxstats.c
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2015-01-30 10:42:29 -0800
committerAdrian Grange <agrange@google.com>2015-01-30 10:42:29 -0800
commitf92c0b16888dfcc07829dc18c779ec84f69ab5d8 (patch)
tree8878c831e787471e94a28c76221a1616fca04d2f /vpxstats.c
parentcc7fac39d5e733e3cddd48a40072c0cfb1ec2689 (diff)
downloadlibvpx-f92c0b16888dfcc07829dc18c779ec84f69ab5d8.tar
libvpx-f92c0b16888dfcc07829dc18c779ec84f69ab5d8.tar.gz
libvpx-f92c0b16888dfcc07829dc18c779ec84f69ab5d8.tar.bz2
libvpx-f92c0b16888dfcc07829dc18c779ec84f69ab5d8.zip
Abort if firstpass file does not exist
This fixes a crash if the firstpass file does not exist when doing a two-pass encode. Change-Id: I3a1a95d68d57125c63123d6208af7537f5a689a0
Diffstat (limited to 'vpxstats.c')
-rw-r--r--vpxstats.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vpxstats.c b/vpxstats.c
index 5f88f8d35..172d8937c 100644
--- a/vpxstats.c
+++ b/vpxstats.c
@@ -41,6 +41,9 @@ int stats_open_file(stats_io_t *stats, const char *fpf, int pass) {
stats->file = fopen(fpf, "rb");
+ if (stats->file == NULL)
+ fatal("First-pass stats file does not exist!");
+
if (fseek(stats->file, 0, SEEK_END))
fatal("First-pass stats file must be seekable!");