g3dvl: Define PIPE_VIDEO_CODEC_UNKNOWN for failures.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 28 Sep 2009 18:01:49 +0000 (19:01 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 29 Sep 2009 10:09:55 +0000 (11:09 +0100)
gcc 4.4 seems particularly picky with int -> enum conversions.

src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_video_state.h

index 1980831dd9def79d5dd39990567e931d5b99a3af..ad42beff47168644e4b01f86117e2fd93411a166 100644 (file)
@@ -318,6 +318,7 @@ enum pipe_transfer_usage {
 
 enum pipe_video_codec
 {
+   PIPE_VIDEO_CODEC_UNKNOWN = 0,
    PIPE_VIDEO_CODEC_MPEG12,   /**< MPEG1, MPEG2 */
    PIPE_VIDEO_CODEC_MPEG4,    /**< DIVX, XVID */
    PIPE_VIDEO_CODEC_VC1,      /**< WMV */
index a0128fbd48fa0adf85c0a66141644ed088f4c09a..b71e959e6f19576be47a6f6581564e24f45f618a 100644 (file)
@@ -63,10 +63,9 @@ u_reduce_video_profile(enum pipe_video_profile profile)
          return PIPE_VIDEO_CODEC_MPEG4_AVC;
 
       default:
-         assert(false);
+         assert(0);
+         return PIPE_VIDEO_CODEC_UNKNOWN;
    }
-
-   return -1;
 }
 
 enum pipe_mpeg12_picture_type