unnecessary brackets removed

- distinction ffmpeg versions


Origin commit data
------------------
Branch: master
Commit: 4e086f9883
Author: Frankenstone <dampf_acc@online.de>
Date: 2021-05-17 (Mon, 17 May 2021)



------------------
This commit was generated by Migit
This commit is contained in:
Frankenstone
2021-05-17 21:07:45 +02:00
committed by vanhofen
parent ad2cd91a07
commit 2af4fc68a3
6 changed files with 14 additions and 14 deletions

View File

@@ -300,7 +300,7 @@ AVCodecContext* open_codec(AVMediaType mediaType, AVFormatContext* formatContext
AVCodec * codec = NULL;
AVCodecContext * codecContext = NULL;
int stream_index;
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 ))
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57,25,101)
stream_index = av_find_best_stream(formatContext, mediaType, -1, -1, NULL, 0);
if (stream_index >=0 ){
codecContext = formatContext->streams[stream_index]->codec;
@@ -360,7 +360,7 @@ int image_to_mpeg2(const char *image_name, const char *encode_name)
av_packet_unref(&packet);
}
avcodec_close(codecContext);
#if (LIBAVFORMAT_VERSION_INT > AV_VERSION_INT( 57,25,100 ))
#if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(57,25,100)
avcodec_free_context(&codecContext);
#endif
}