Browse Source

avformat/ftp: allow nonstandard 202 reply to OPTS UTF8

Fixes ticket #7481.

Signed-off-by: Marton Balint <cus@passwd.hu>
tags/n4.2
Marton Balint 7 years ago
parent
commit
8e5a2495a8
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/ftp.c

+ 3
- 2
libavformat/ftp.c View File

@@ -513,7 +513,7 @@ static int ftp_features(FTPContext *s)
static const char *feat_command = "FEAT\r\n";
static const char *enable_utf8_command = "OPTS UTF8 ON\r\n";
static const int feat_codes[] = {211, 0};
static const int opts_codes[] = {200, 451, 0};
static const int opts_codes[] = {200, 202, 451, 0};

av_freep(&s->features);
if (ftp_send_command(s, feat_command, feat_codes, &s->features) != 211) {
@@ -521,7 +521,8 @@ static int ftp_features(FTPContext *s)
}

if (ftp_has_feature(s, "UTF8")) {
if (ftp_send_command(s, enable_utf8_command, opts_codes, NULL) == 200)
int ret = ftp_send_command(s, enable_utf8_command, opts_codes, NULL);
if (ret == 200 || ret == 202)
s->utf8 = 1;
}



Loading…
Cancel
Save