Commit c830468d authored by Laurent Aimar's avatar Laurent Aimar

Do not allocate 0x0 region in ffmpeg subtitle decoder.

parent d1474ca6
...@@ -183,8 +183,10 @@ void EndSubtitleDec(decoder_t *dec) ...@@ -183,8 +183,10 @@ void EndSubtitleDec(decoder_t *dec)
*/ */
static subpicture_region_t *ConvertRegionRGBA(AVSubtitleRect *ffregion) static subpicture_region_t *ConvertRegionRGBA(AVSubtitleRect *ffregion)
{ {
video_format_t fmt; if (ffregion->w <= 0 || ffregion->h <= 0)
return NULL;
video_format_t fmt;
memset(&fmt, 0, sizeof(fmt)); memset(&fmt, 0, sizeof(fmt));
fmt.i_chroma = VLC_FOURCC('R','G','B','A'); fmt.i_chroma = VLC_FOURCC('R','G','B','A');
fmt.i_aspect = 0; fmt.i_aspect = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment