Revision 6e37b458 libavformat/mmst.c

View differences:

libavformat/mmst.c
146 146
               exact_length, write_result,
147 147
               write_result < 0 ? strerror(write_result) :
148 148
                   "The server closed the connection");
149
        return AVERROR_IO;
149
        return AVERROR(EIO);
150 150
    }
151 151

  
152 152
    return 0;
......
268 268
                       read_result,
269 269
                       read_result < 0 ? strerror(read_result) :
270 270
                           "The server closed the connection");
271
                return read_result < 0 ? read_result : AVERROR_IO;
271
                return read_result < 0 ? read_result : AVERROR(EIO);
272 272
            }
273 273

  
274 274
            length_remaining= AV_RL32(mms->in_buffer+8) + 4;
......
289 289
                       length_remaining, read_result,
290 290
                       read_result < 0 ? strerror(read_result) :
291 291
                           "The server closed the connection");
292
                return read_result < 0 ? read_result : AVERROR_IO;
292
                return read_result < 0 ? read_result : AVERROR(EIO);
293 293
            }
294 294
            packet_type= AV_RL16(mms->in_buffer+36);
295 295
            if (read_result >= 44 && (hr = AV_RL32(mms->in_buffer + 40))) {
296 296
                av_log(NULL, AV_LOG_ERROR,
297 297
                       "Server sent a message with packet type 0x%x and error status code 0x%08x\n", packet_type, hr);
298
                return AVERROR_UNKNOWN;
298
                return AVERROR(EINVAL);
299 299
            }
300 300
        } else {
301 301
            int length_remaining;
......
326 326
                       length_remaining, read_result,
327 327
                       read_result < 0 ? strerror(read_result) :
328 328
                           "The server closed the connection");
329
                return read_result < 0 ? read_result : AVERROR_IO;
329
                return read_result < 0 ? read_result : AVERROR(EIO);
330 330
            }
331 331

  
332 332
            // if we successfully read everything.
......
550 550
    if((mmst->incoming_flags != 0X08) && (mmst->incoming_flags != 0X0C)) {
551 551
        av_log(NULL, AV_LOG_ERROR,
552 552
               "The server does not support MMST (try MMSH or RTSP)\n");
553
        err = AVERROR_NOFMT;
553
        err = AVERROR(EINVAL);
554 554
        goto fail;
555 555
    }
556 556
    err = ff_mms_asf_header_parser(mms);
......
604 604
                    av_log(NULL, AV_LOG_ERROR,
605 605
                           "Incoming pktlen %d is larger than ASF pktsize %d\n",
606 606
                           mms->remaining_in_len, mms->asf_packet_len);
607
                    result= AVERROR_IO;
607
                    result= AVERROR(EIO);
608 608
                } else {
609 609
                    // copy the data to the packet buffer.
610 610
                    result = ff_mms_read_data(mms, buf, size);

Also available in: Unified diff