aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-24 13:01:31 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-24 13:14:07 +0100
commit96dce6f7ceaa8d3c7eddd241213bec82e84e7f7a (patch)
treec64e48cefd1235d4fa85b270a337e2d79c8b0d00
parent3f56224a9a83719b5bb42ad0bb9a6267b131e50b (diff)
downloadffmpeg-96dce6f7ceaa8d3c7eddd241213bec82e84e7f7a.tar.gz
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: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/seek.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/seek.c b/libavformat/seek.c
index 6a38ba79e5..967f282d51 100644
--- a/libavformat/seek.c
+++ b/libavformat/seek.c
@@ -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);