Commit 96dce6f7 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/seek: move the cur variable into the loop

This improves readability and makes it clear that the freed
value is not used after the end of an iteration
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3f56224a
......@@ -476,9 +476,8 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
static void free_packet_list(AVPacketList *pktl)
{
AVPacketList *cur;
while (pktl) {
cur = pktl;
AVPacketList *cur = pktl;
pktl = cur->next;
av_free_packet(&cur->pkt);
av_free(cur);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment