From 9ad7dfc110de1c7540d5050c1d4f075f57cb9f7a Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Date: Mon, 31 May 2010 22:01:31 +0000
Subject: [PATCH] Pass codec pixel format list to get_format, if present, fix
 vdpau decoding

Originally committed as revision 23396 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/h264.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e4eb232ea16..ef0999617a2 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1850,6 +1850,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
                       h->sps.num_units_in_tick, den, 1<<30);
         }
         s->avctx->pix_fmt = s->avctx->get_format(s->avctx,
+                                                 s->avctx->codec->pix_fmts ?
+                                                 s->avctx->codec->pix_fmts :
                                                  s->avctx->color_range == AVCOL_RANGE_JPEG ?
                                                  hwaccel_pixfmt_list_h264_jpeg_420 :
                                                  ff_hwaccel_pixfmt_list_420);
-- 
GitLab