[Android] Media: Do not display non-sensical infos
Jean-Baptiste Kempf
git at videolan.org
Tue Jun 19 20:42:12 CEST 2012
android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jun 19 20:37:14 2012 +0200| [31e148e286c21774b1c231b142c39591700d8ea6] | committer: Jean-Baptiste Kempf
Media: Do not display non-sensical infos
Close #6972 #6973
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=31e148e286c21774b1c231b142c39591700d8ea6
---
vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
index 6b24fc9..5d6fdf5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoAdapter.java
@@ -93,8 +93,10 @@ public class MediaInfoAdapter extends ArrayAdapter<TrackInfo> {
}
private void appendVideo(StringBuilder textBuilder, Resources res, TrackInfo track) {
- textBuilder.append(res.getString(R.string.track_resolution_info, track.Width, track.Height));
- textBuilder.append(res.getString(R.string.track_framerate_info, track.Framerate));
+ if( track.Width != 0 && track.Height != 0 )
+ textBuilder.append(res.getString(R.string.track_resolution_info, track.Width, track.Height));
+ if( !Float.isNaN(track.Framerate) )
+ textBuilder.append(res.getString(R.string.track_framerate_info, track.Framerate));
}
static class ViewHolder {
More information about the Android
mailing list