fix possible segfault arm hardware, thx DboxOldie

This commit is contained in:
Frankenstone
2019-02-27 13:46:58 +01:00
committed by Thilo Graf
parent 23ee0a2ae6
commit 3dec38599a
2 changed files with 7 additions and 5 deletions

View File

@@ -296,8 +296,10 @@ AVCodecContext* open_codec(AVMediaType mediaType, AVFormatContext* formatContext
int image_to_mpeg2(const char *image_name, int fd)
{
int ret = 0;
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
av_register_all();
avcodec_register_all();
#endif
AVFormatContext *formatContext = avformat_alloc_context();
if (formatContext && (ret = avformat_open_input(&formatContext, image_name, NULL, NULL)) == 0){