ffplay: in input_config_props(), prefer "s" over unnecessary "c" temporary variable
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 16 Aug 2011 15:34:50 +0000 (17:34 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 17 Aug 2011 08:29:34 +0000 (10:29 +0200)
Sligthly improve readability, reduce redundancy.

ffplay.c

index 13f6688..b276056 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1640,14 +1640,13 @@ static int input_query_formats(AVFilterContext *ctx)
 static int input_config_props(AVFilterLink *link)
 {
     FilterPriv *priv  = link->src->priv;
-    AVCodecContext *c = priv->is->video_st->codec;
     AVStream *s = priv->is->video_st;
 
-    link->w = c->width;
-    link->h = c->height;
+    link->w = s->codec->width;
+    link->h = s->codec->height;
     link->sample_aspect_ratio = s->sample_aspect_ratio.num ?
-        s->sample_aspect_ratio : c->sample_aspect_ratio;
-    link->time_base = priv->is->video_st->time_base;
+        s->sample_aspect_ratio : s->codec->sample_aspect_ratio;
+    link->time_base = s->time_base;
 
     return 0;
 }