avformat/webpenc: Reindentation
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -53,22 +53,22 @@ static int webp_init(AVFormatContext *s)
|
|||||||
|
|
||||||
static int is_animated_webp_packet(AVPacket *pkt)
|
static int is_animated_webp_packet(AVPacket *pkt)
|
||||||
{
|
{
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
unsigned flags = 0;
|
unsigned flags = 0;
|
||||||
|
|
||||||
if (pkt->size < 4)
|
if (pkt->size < 4)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
if (AV_RL32(pkt->data) == AV_RL32("RIFF"))
|
if (AV_RL32(pkt->data) == AV_RL32("RIFF"))
|
||||||
skip = 12;
|
skip = 12;
|
||||||
// Safe to do this as a valid WebP bitstream is >=30 bytes.
|
// Safe to do this as a valid WebP bitstream is >=30 bytes.
|
||||||
if (pkt->size < skip + 4)
|
if (pkt->size < skip + 4)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
if (AV_RL32(pkt->data + skip) == AV_RL32("VP8X")) {
|
if (AV_RL32(pkt->data + skip) == AV_RL32("VP8X")) {
|
||||||
flags |= pkt->data[skip + 4 + 4];
|
flags |= pkt->data[skip + 4 + 4];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & 2) // ANIMATION_FLAG is on
|
if (flags & 2) // ANIMATION_FLAG is on
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user