mirror of https://git.ffmpeg.org/ffmpeg.git
tak: simplify ff_tak_check_crc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
b84de51f54
commit
f5d5bc3493
|
@ -19,7 +19,6 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libavutil/bswap.h"
|
|
||||||
#include "libavutil/crc.h"
|
#include "libavutil/crc.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "tak.h"
|
#include "tak.h"
|
||||||
|
@ -97,7 +96,7 @@ int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
buf_size -= 3;
|
buf_size -= 3;
|
||||||
|
|
||||||
CRC = av_bswap32(AV_RL24(buf + buf_size)) >> 8;
|
CRC = AV_RB24(buf + buf_size);
|
||||||
crc = av_crc(crc_24, 0xCE04B7U, buf, buf_size);
|
crc = av_crc(crc_24, 0xCE04B7U, buf, buf_size);
|
||||||
if (CRC != crc)
|
if (CRC != crc)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
Loading…
Reference in New Issue