From a514244319abe39a9b2d6e4b2f5f0a5917b87e74 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Fri, 5 Jul 2019 11:52:49 +0800 Subject: [PATCH] avformat/dashdec: fix code style in dash_read_packet --- libavformat/dashdec.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index a78b90b5b0..9364718c15 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -2181,37 +2181,38 @@ static int dash_read_packet(AVFormatContext *s, AVPacket *pkt) int ret = 0, i; int64_t mints = 0; struct representation *cur = NULL; + struct representation *rep = NULL; recheck_discard_flags(s, c->videos, c->n_videos); recheck_discard_flags(s, c->audios, c->n_audios); recheck_discard_flags(s, c->subtitles, c->n_subtitles); for (i = 0; i < c->n_videos; i++) { - struct representation *pls = c->videos[i]; - if (!pls->ctx) + rep = c->videos[i]; + if (!rep->ctx) continue; - if (!cur || pls->cur_timestamp < mints) { - cur = pls; - mints = pls->cur_timestamp; + if (!cur || rep->cur_timestamp < mints) { + cur = rep; + mints = rep->cur_timestamp; } } for (i = 0; i < c->n_audios; i++) { - struct representation *pls = c->audios[i]; - if (!pls->ctx) + rep = c->audios[i]; + if (!rep->ctx) continue; - if (!cur || pls->cur_timestamp < mints) { - cur = pls; - mints = pls->cur_timestamp; + if (!cur || rep->cur_timestamp < mints) { + cur = rep; + mints = rep->cur_timestamp; } } for (i = 0; i < c->n_subtitles; i++) { - struct representation *pls = c->subtitles[i]; - if (!pls->ctx) + rep = c->subtitles[i]; + if (!rep->ctx) continue; - if (!cur || pls->cur_timestamp < mints) { - cur = pls; - mints = pls->cur_timestamp; + if (!cur || rep->cur_timestamp < mints) { + cur = rep; + mints = rep->cur_timestamp; } }