From: hyc Date: Thu, 31 Dec 2009 03:05:40 +0000 (+0000) Subject: Silence warning X-Git-Tag: v2.4~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=398c655841befe207dceaee7b3e28d571253d1f2;p=rtmpdump Silence warning git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@153 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/rtmpdump.c b/rtmpdump.c index 35f2a7a..3110f61 100644 --- a/rtmpdump.c +++ b/rtmpdump.c @@ -696,7 +696,9 @@ GetLastKeyframe(FILE * file, // output file [in] size = ftello(file); fseek(file, 4, SEEK_SET); - fread(&dataType, sizeof(uint8_t), 1, file); + if (fread(&dataType, sizeof(uint8_t), 1, file) != 1) + return RD_FAILED; + bAudioOnly = (dataType & 0x4) && !(dataType & 0x1); Log(LOGDEBUG, "bAudioOnly: %d, size: %llu", bAudioOnly,