tls_gnutls: fix hang on disconnection
[ffmpeg.git] / libavformat / avs.c
index 3e95a36..d8042c5 100644 (file)
@@ -182,7 +182,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
             case AVS_VIDEO:
                 if (!avs->st_video) {
                     avs->st_video = avformat_new_stream(s, NULL);
-                    if (avs->st_video == NULL)
+                    if (!avs->st_video)
                         return AVERROR(ENOMEM);
                     avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                     avs->st_video->codec->codec_id = AV_CODEC_ID_AVS;
@@ -198,7 +198,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
             case AVS_AUDIO:
                 if (!avs->st_audio) {
                     avs->st_audio = avformat_new_stream(s, NULL);
-                    if (avs->st_audio == NULL)
+                    if (!avs->st_audio)
                         return AVERROR(ENOMEM);
                     avs->st_audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
                 }