mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
frwu: use MKTAG to check marker instead of AV_RL32
Using intreadwrite.h for this is overkill. Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
parent
919f355438
commit
05d089a80b
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
|
||||||
|
|
||||||
static av_cold int decode_init(AVCodecContext *avctx)
|
static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
@ -54,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
av_log(avctx, AV_LOG_ERROR, "Packet is too small.\n");
|
av_log(avctx, AV_LOG_ERROR, "Packet is too small.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (bytestream_get_le32(&buf) != AV_RL32("FRW1")) {
|
if (bytestream_get_le32(&buf) != MKTAG('F', 'R', 'W', '1')) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "incorrect marker\n");
|
av_log(avctx, AV_LOG_ERROR, "incorrect marker\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user