Re: [FFmpeg-devel] [PATCH 4/5] avcodec/d3d12va_decode: remove assertion from get_surface_index

2023-12-26 Thread Xiang, Haihao
On Ma, 2023-12-25 at 22:18 +0800, Tong Wu wrote:
> Return zero for failed case and avoid aborting the program.
> 
> Signed-off-by: Tong Wu 
> ---
>  libavcodec/d3d12va_decode.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c
> index 50d5b8d601..20dc485284 100644
> --- a/libavcodec/d3d12va_decode.c
> +++ b/libavcodec/d3d12va_decode.c
> @@ -20,7 +20,6 @@
>   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
> USA
>   */
>  
> -#include 
>  #include 
>  #include 
>  
> @@ -80,7 +79,6 @@ unsigned ff_d3d12va_get_surface_index(const AVCodecContext
> *avctx,
>  }
>  
>  fail:
> -    assert(0);

Something is wrong if arriving here, could you add a warning message ? 

Thanks
Haihao


>  return 0;
>  }
>  

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH 4/5] avcodec/d3d12va_decode: remove assertion from get_surface_index

2023-12-25 Thread Tong Wu
Return zero for failed case and avoid aborting the program.

Signed-off-by: Tong Wu 
---
 libavcodec/d3d12va_decode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c
index 50d5b8d601..20dc485284 100644
--- a/libavcodec/d3d12va_decode.c
+++ b/libavcodec/d3d12va_decode.c
@@ -20,7 +20,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include 
 #include 
 #include 
 
@@ -80,7 +79,6 @@ unsigned ff_d3d12va_get_surface_index(const AVCodecContext 
*avctx,
 }
 
 fail:
-assert(0);
 return 0;
 }
 
-- 
2.41.0.windows.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".