mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
moviecut: fix format-string and sign-compare warnings
Origin commit data
------------------
Branch: ni/coolstream
Commit: a5241af87e
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-02-21 (Sat, 21 Feb 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
73f21a3bd2
commit
c3852f2616
@@ -154,7 +154,7 @@ off64_t CMovieCut::getSecondSize(MI_MOVIE_INFO * minfo)
|
|||||||
duration = len * 60 * 1000;
|
duration = len * 60 * 1000;
|
||||||
|
|
||||||
off64_t mssize = ((float)s.st_size / (float)duration);
|
off64_t mssize = ((float)s.st_size / (float)duration);
|
||||||
printf("CMovieCut::%s: [%s] bytes per second: %lld\n", __func__, minfo->file.Name.c_str(), mssize*1000);
|
printf("CMovieCut::%s: [%s] bytes per second: %" PRId64 "\n", __func__, minfo->file.Name.c_str(), mssize*1000);
|
||||||
return mssize*1000;
|
return mssize*1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ bool CMovieCut::truncateMovie(MI_MOVIE_INFO * minfo)
|
|||||||
|
|
||||||
off64_t newsize = secsize * minfo->bookmarks.end;
|
off64_t newsize = secsize * minfo->bookmarks.end;
|
||||||
|
|
||||||
printf("CMovieCut::%s: [%s] truncate to %d sec, new size %lld\n", __func__, minfo->file.Name.c_str(), minfo->bookmarks.end, newsize);
|
printf("CMovieCut::%s: [%s] truncate to %d sec, new size %" PRId64 "\n", __func__, minfo->file.Name.c_str(), minfo->bookmarks.end, newsize);
|
||||||
if (truncate(minfo->file.Name.c_str(), newsize)) {
|
if (truncate(minfo->file.Name.c_str(), newsize)) {
|
||||||
perror(minfo->file.Name.c_str());
|
perror(minfo->file.Name.c_str());
|
||||||
return false;
|
return false;
|
||||||
@@ -216,7 +216,7 @@ off64_t CMovieCut::fake_read(int fd, unsigned char *buf, size_t size, off64_t fs
|
|||||||
off64_t cur = lseek64(fd, 0, SEEK_CUR);
|
off64_t cur = lseek64(fd, 0, SEEK_CUR);
|
||||||
|
|
||||||
buf[0] = 0x47;
|
buf[0] = 0x47;
|
||||||
if((cur + size) > fsize)
|
if ((cur + (off64_t)size) > fsize)
|
||||||
return(fsize - cur);
|
return(fsize - cur);
|
||||||
else
|
else
|
||||||
return size;
|
return size;
|
||||||
@@ -429,7 +429,7 @@ bool CMovieCut::cutMovie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie)
|
|||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
int wptr = 0;
|
int wptr = 0;
|
||||||
if (r != toread)
|
if (r != toread)
|
||||||
printf("CMovieCut::%s: short read at %" PRId64 ": %d\n", __func__, offset, r);
|
printf("CMovieCut::%s: short read at %" PRId64 ": %d\n", __func__, offset, (int)r);
|
||||||
if (buf[0] != 0x47)
|
if (buf[0] != 0x47)
|
||||||
printf("CMovieCut::%s: buffer not aligned at %" PRId64 "\n", __func__, offset);
|
printf("CMovieCut::%s: buffer not aligned at %" PRId64 "\n", __func__, offset);
|
||||||
if (need_gop) {
|
if (need_gop) {
|
||||||
@@ -584,7 +584,7 @@ bool CMovieCut::copyMovie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie, bool onefi
|
|||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
int wptr = 0;
|
int wptr = 0;
|
||||||
if (r != toread)
|
if (r != toread)
|
||||||
printf("****** short read ? %d\n", r);
|
printf("****** short read ? %d\n", (int)r);
|
||||||
if (buf[0] != 0x47)
|
if (buf[0] != 0x47)
|
||||||
printf("copy: buffer not aligned at %" PRId64 "\n", offset);
|
printf("copy: buffer not aligned at %" PRId64 "\n", offset);
|
||||||
if (need_gop) {
|
if (need_gop) {
|
||||||
|
Reference in New Issue
Block a user