vaapidecode: use macros for GstVideoInfo
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 31 Mar 2016 14:39:08 +0000 (16:39 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Mon, 18 Apr 2016 14:55:01 +0000 (16:55 +0200)
Instead of accessing directly to the members of the structure, use the macros.

gst/vaapi/gstvaapidecode.c

index 6b904e4..fd2ca11 100644 (file)
@@ -279,13 +279,15 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
   height = decode->display_height;
 
   if (!width || !height) {
-    width = ref_state->info.width;
-    height = ref_state->info.height;
+    width = GST_VIDEO_INFO_WIDTH (&ref_state->info);
+    height = GST_VIDEO_INFO_HEIGHT (&ref_state->info);
   }
 
   state = gst_video_decoder_set_output_state (vdec, format, width, height,
       ref_state);
-  if (!state || state->info.width == 0 || state->info.height == 0) {
+  if (!state
+      || GST_VIDEO_INFO_WIDTH (&state->info) == 0
+      || GST_VIDEO_INFO_HEIGHT (&state->info) == 0) {
     if (features)
       gst_caps_features_free (features);
     if (state)