[vlc-commits] mediacodec: change type of internal variables to bool.

Felix Abecassis git at videolan.org
Fri Nov 15 22:07:11 CET 2013


vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Fri Nov 15 15:47:19 2013 +0100| [75b67dbce7fef04454f1a9708d69bfbfc786e4b9] | committer: Rémi Denis-Courmont

mediacodec: change type of internal variables to bool.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75b67dbce7fef04454f1a9708d69bfbfc786e4b9
---

 modules/codec/omxil/android_mediacodec.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index ef1f90c..3c94984 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -73,8 +73,8 @@ struct decoder_sys_t
     int crop_top, crop_left;
     char *name;
 
-    int started;
-    int decoded;
+    bool started;
+    bool decoded;
 
     ArchitectureSpecificCopyData architecture_specific_data;
 };
@@ -347,7 +347,7 @@ static int OpenDecoder(vlc_object_t *p_this)
         (*env)->ExceptionClear(env);
         goto error;
     }
-    p_sys->started = 1;
+    p_sys->started = true;
 
     p_sys->input_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_input_buffers);
     p_sys->output_buffers = (*env)->CallObjectMethod(env, p_sys->codec, p_sys->get_output_buffers);
@@ -526,7 +526,7 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
                 (*env)->ExceptionClear(env);
             }
         }
-        p_sys->decoded = 0;
+        p_sys->decoded = false;
         (*myVm)->DetachCurrentThread(myVm);
         return NULL;
     }
@@ -562,7 +562,7 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
             ts = p_block->i_dts;
         (*env)->CallVoidMethod(env, p_sys->codec, p_sys->queue_input_buffer, index, 0, size, ts, 0);
         (*env)->DeleteLocalRef(env, buf);
-        p_sys->decoded = 1;
+        p_sys->decoded = true;
         break;
     }
     if (!p_pic)



More information about the vlc-commits mailing list