Revision c60112f2

View differences:

libavformat/applehttpproto.c
195 195
        av_strlcpy(s->playlisturl, "http://", sizeof(s->playlisturl));
196 196
        av_strlcat(s->playlisturl, nested_url, sizeof(s->playlisturl));
197 197
    } else {
198
        av_log(NULL, AV_LOG_ERROR, "Unsupported url %s\n", uri);
198
        av_log(h, AV_LOG_ERROR, "Unsupported url %s\n", uri);
199 199
        ret = AVERROR(EINVAL);
200 200
        goto fail;
201 201
    }
......
218 218
    }
219 219

  
220 220
    if (s->n_segments == 0) {
221
        av_log(NULL, AV_LOG_WARNING, "Empty playlist\n");
221
        av_log(h, AV_LOG_WARNING, "Empty playlist\n");
222 222
        ret = AVERROR(EIO);
223 223
        goto fail;
224 224
    }
......
258 258
                return ret;
259 259
    }
260 260
    if (s->cur_seq_no < s->start_seq_no) {
261
        av_log(NULL, AV_LOG_WARNING,
261
        av_log(h, AV_LOG_WARNING,
262 262
               "skipping %d segments ahead, expired from playlist\n",
263 263
               s->start_seq_no - s->cur_seq_no);
264 264
        s->cur_seq_no = s->start_seq_no;
......
274 274
        goto retry;
275 275
    }
276 276
    url = s->segments[s->cur_seq_no - s->start_seq_no]->url,
277
    av_log(NULL, AV_LOG_DEBUG, "opening %s\n", url);
277
    av_log(h, AV_LOG_DEBUG, "opening %s\n", url);
278 278
    ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ);
279 279
    if (ret < 0) {
280 280
        if (url_interrupt_cb())
281 281
            return AVERROR_EXIT;
282
        av_log(NULL, AV_LOG_WARNING, "Unable to open %s\n", url);
282
        av_log(h, AV_LOG_WARNING, "Unable to open %s\n", url);
283 283
        s->cur_seq_no++;
284 284
        goto retry;
285 285
    }
libavformat/gopher.c
50 50
            if (!path) return AVERROR(EINVAL);
51 51
            break;
52 52
        default:
53
            av_log(NULL, AV_LOG_WARNING,
53
            av_log(h, AV_LOG_WARNING,
54 54
                   "Gopher protocol type '%c' not supported yet!\n",
55 55
                   *path);
56 56
            return AVERROR(EINVAL);
libavformat/http.c
70 70
    int len = strlen(headers);
71 71

  
72 72
    if (len && strcmp("\r\n", headers + len - 2))
73
        av_log(NULL, AV_LOG_ERROR, "No trailing CRLF found in HTTP header.\n");
73
        av_log(h, AV_LOG_ERROR, "No trailing CRLF found in HTTP header.\n");
74 74

  
75 75
    av_strlcpy(s->headers, headers, sizeof(s->headers));
76 76
}
......
232 232
         * don't abort until all headers have been parsed. */
233 233
        if (s->http_code >= 400 && s->http_code < 600 && s->http_code != 401) {
234 234
            end += strspn(end, SPACE_CHARS);
235
            av_log(NULL, AV_LOG_WARNING, "HTTP error %d %s\n",
235
            av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n",
236 236
                   s->http_code, end);
237 237
            return -1;
238 238
        }
libavformat/tcp.c
64 64
    snprintf(portstr, sizeof(portstr), "%d", port);
65 65
    ret = getaddrinfo(hostname, portstr, &hints, &ai);
66 66
    if (ret) {
67
        av_log(NULL, AV_LOG_ERROR,
67
        av_log(h, AV_LOG_ERROR,
68 68
               "Failed to resolve hostname %s: %s\n",
69 69
               hostname, gai_strerror(ret));
70 70
        return AVERROR(EIO);
......
119 119
        optlen = sizeof(ret);
120 120
        getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
121 121
        if (ret != 0) {
122
            av_log(NULL, AV_LOG_ERROR,
122
            av_log(h, AV_LOG_ERROR,
123 123
                   "TCP connection to %s:%d failed: %s\n",
124 124
                   hostname, port, strerror(ret));
125 125
            goto fail;
libavformat/udp.c
266 266
                if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr,
267 267
                            s->dest_addr_len)) {
268 268
                    s->is_connected = 0;
269
                    av_log(NULL, AV_LOG_ERROR, "connect: %s\n", strerror(errno));
269
                    av_log(h, AV_LOG_ERROR, "connect: %s\n", strerror(errno));
270 270
                    return AVERROR(EIO);
271 271
                }
272 272
            }
......
410 410
        /* limit the tx buf size to limit latency */
411 411
        tmp = s->buffer_size;
412 412
        if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) {
413
            av_log(NULL, AV_LOG_ERROR, "setsockopt(SO_SNDBUF): %s\n", strerror(errno));
413
            av_log(h, AV_LOG_ERROR, "setsockopt(SO_SNDBUF): %s\n", strerror(errno));
414 414
            goto fail;
415 415
        }
416 416
    } else {
......
418 418
         * avoid losing data on OSes that set this too low by default. */
419 419
        tmp = s->buffer_size;
420 420
        if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) {
421
            av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_RECVBUF): %s\n", strerror(errno));
421
            av_log(h, AV_LOG_WARNING, "setsockopt(SO_RECVBUF): %s\n", strerror(errno));
422 422
        }
423 423
        /* make the socket non-blocking */
424 424
        ff_socket_nonblock(udp_fd, 1);
425 425
    }
426 426
    if (s->is_connected) {
427 427
        if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) {
428
            av_log(NULL, AV_LOG_ERROR, "connect: %s\n", strerror(errno));
428
            av_log(h, AV_LOG_ERROR, "connect: %s\n", strerror(errno));
429 429
            goto fail;
430 430
        }
431 431
    }

Also available in: Unified diff