summaryrefslogtreecommitdiff
path: root/libavformat/evcdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-06-17 22:18:14 -0300
committerJames Almer <jamrial@gmail.com>2023-06-20 11:35:21 -0300
commit5a2ff4338444b87248e838061214f3d72f1e8447 (patch)
tree22bfe990fc49fe613ecbe113742ff362ae625e4a /libavformat/evcdec.c
parentca8a66017683752a84ea49357f8029d7fb00c1f0 (diff)
avformat/evcdec: simplify au_end_found check
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/evcdec.c')
-rw-r--r--libavformat/evcdec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/evcdec.c b/libavformat/evcdec.c
index 0c30f3b4fe..41b0bceb0c 100644
--- a/libavformat/evcdec.c
+++ b/libavformat/evcdec.c
@@ -182,7 +182,7 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
int32_t nalu_size;
- int au_end_found;
+ int au_end_found = 0;
EVCDemuxContext *const c = s->priv_data;
@@ -192,8 +192,6 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_EOF;
}
- au_end_found = 0;
-
while(!au_end_found) {
uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE];
@@ -229,9 +227,8 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_ERROR, "evc_frame_merge filter failed to "
"send output packet\n");
- au_end_found = 1;
- if (ret == AVERROR(EAGAIN))
- au_end_found = 0;
+ if (ret != AVERROR(EAGAIN))
+ au_end_found = 1;
}
return ret;