diff utils.c @ 9011:90c99bda19f5 libavcodec

Approved hunks for VAAPI / our new shiny hwaccel API by Gwenole Beauchesne gbeauchesne splitted desktop com
author michael
date Mon, 23 Feb 2009 13:35:52 +0000
parents 5a9485bd4421
children 1de11a984fc6
line wrap: on
line diff
--- a/utils.c	Sun Feb 22 23:13:00 2009 +0000
+++ b/utils.c	Mon Feb 23 13:35:52 2009 +0000
@@ -391,7 +391,9 @@
     return 0;
 }
 
-enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt){
+enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat *fmt){
+    while (*fmt != PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt))
+        ++fmt;
     return fmt[0];
 }