diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-14 11:41:48 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-14 11:41:48 +0200 |
commit | 8cb015ad395d13043a7a63a0294550dc4bb3afd8 (patch) | |
tree | 8fec5211547b4b08849eaa71bbfab056fc008693 /plugins/liboggedit/oggedit_opus.c | |
parent | 055ca014541453a3a2e07db6902b16f9406bf530 (diff) | |
parent | caf400178adbcaaace2a258354b7310067726a04 (diff) |
Merge pull request #13 from Lithopsian/flac
Flac/oggflac bitrate calculation improvements
Diffstat (limited to 'plugins/liboggedit/oggedit_opus.c')
-rw-r--r-- | plugins/liboggedit/oggedit_opus.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/liboggedit/oggedit_opus.c b/plugins/liboggedit/oggedit_opus.c index 5533a619..21d75360 100644 --- a/plugins/liboggedit/oggedit_opus.c +++ b/plugins/liboggedit/oggedit_opus.c @@ -60,10 +60,9 @@ int oggedit_write_opus_file(DB_FILE *in, const char *outname, const off_t offset off_t oggedit_opus_stream_info(DB_FILE *in, const off_t start_offset, const off_t end_offset, char **codecs) { - int res; ogg_sync_state oy; ogg_sync_init(&oy); - *codecs = codec_names(in, &oy, start_offset, &res); + *codecs = codec_names(in, &oy, start_offset); const off_t stream_size = codec_stream_size(in, &oy, start_offset, end_offset, OPUSNAME); cleanup(in, NULL, &oy, NULL); return stream_size; @@ -174,7 +173,7 @@ off_t oggedit_write_opus_metadata(DB_FILE *in, const char *fname, const off_t of /* If we have tempfile, copy the remaining pages */ if (*tempname) { - if ((res = copy_remaining_pages(in, out, &oy, opus_serial, pageno)) < OGGEDIT_EOF) + if ((res = copy_remaining_pages(in, out, &oy, opus_serial, pageno)) <= OGGEDIT_EOF) goto cleanup; if (rename(tempname, fname)) { res = OGGEDIT_RENAME_FAILED; @@ -193,8 +192,8 @@ cleanup: /* struct timeval timeval; gettimeofday(&timeval, NULL); -int usecs = timeval.tv_sec* 1000000 + timeval.tv_usec; +int usecs = timeval.tv_sec*1000000 + timeval.tv_usec; gettimeofday(&timeval, NULL); -usecs = timeval.tv_sec* 1000000 + timeval.tv_usec - usecs; +usecs = timeval.tv_sec*1000000 + timeval.tv_usec - usecs; fprintf(stderr, "%d micro-seconds\n", usecs); */ |