Skip to content

Commit

Permalink
dump_video: Empty video files will not be dumped.
Browse files Browse the repository at this point in the history
Empty input video files will not be processed in 'dump_video' and
an error message will be shown instead.
  • Loading branch information
danesh-d authored and tdaede committed Jun 16, 2017
1 parent bc70091 commit 7278368
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/dump_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ int main(int argc, char *argv[]) {
/* Only interested in Daala streams */
while (!stateflag) {
int ret = buffer_data(infile, &oy);
if (ret == 0) break;
if (ret == 0) {
/* Input file is empty.*/
fprintf(stderr, "End of file while searching for codec headers.\n");
exit(1);
}
while (ogg_sync_pageout(&oy, &og) > 0) {
int got_packet;
ogg_stream_state test;
Expand Down

0 comments on commit 7278368

Please sign in to comment.