summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-30 23:28:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-30 23:28:15 +0100
commit25a360286db80b411377b290baa466178070c007 (patch)
tree7d2c4995256b98364f2bb5aeb6b476b84d46d5a8 /libavcodec/dvbsubdec.c
parent47f1596ecef3304f20be1be2dc6978989334608f (diff)
avcodec/dvbsubdec: merge declaration and init
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 097597ed91..c0a3790a0e 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -327,10 +327,8 @@ static void delete_region_display_list(DVBSubContext *ctx, DVBSubRegion *region)
static void delete_cluts(DVBSubContext *ctx)
{
- DVBSubCLUT *clut;
-
while (ctx->clut_list) {
- clut = ctx->clut_list;
+ DVBSubCLUT *clut = ctx->clut_list;
ctx->clut_list = clut->next;
@@ -340,10 +338,8 @@ static void delete_cluts(DVBSubContext *ctx)
static void delete_objects(DVBSubContext *ctx)
{
- DVBSubObject *object;
-
while (ctx->object_list) {
- object = ctx->object_list;
+ DVBSubObject *object = ctx->object_list;
ctx->object_list = object->next;
@@ -353,10 +349,8 @@ static void delete_objects(DVBSubContext *ctx)
static void delete_regions(DVBSubContext *ctx)
{
- DVBSubRegion *region;
-
while (ctx->region_list) {
- region = ctx->region_list;
+ DVBSubRegion *region = ctx->region_list;
ctx->region_list = region->next;