* qatar/master: Makefile: Include dependencies for test tools, too Remove a version check in av_log made unnecessary by the big bump. update last major version increase dates in APIchanges Reduce picture size for yadif. oggdec: use av_freep() instead of av_free() avio: Fix sanity checks in ffurl_read* libavformat: Free AVFormatContext->streams libavformat: Make protocols pass URLContext as log context where available asf: remove commented out code in asf_read_seek not pulled: libpostproc: Remove crufty code disabled by the big bump. Reflect 0.7_beta1 release in the Changelog not pulled: sws: remove disabled cruft. lavu: remove disabled ff_random_get_seed cruft. lavu: remove disabled sha1 cruft. Conflicts: Changelog libavutil/sha1.h
Unified · Split
| @@ -9,6 +9,11 @@ version <next>: · 8 unmodified lines | |||
| 9 | - mpeg2 aspect ratio dection fixed | 9 | - mpeg2 aspect ratio dection fixed |
| 10 | - libxvid aspect pickiness fixed | 10 | - libxvid aspect pickiness fixed |
| 11 | - Frame multithreaded decoding | 11 | - Frame multithreaded decoding |
| 12 | - Lots of deprecated API cruft removed | ||
| 13 | |||
| 14 | |||
| 15 | version 0.7_beta1: | ||
| 16 | |||
| 12 | - WebM support in Matroska de/muxer | 17 | - WebM support in Matroska de/muxer |
| 13 | - low overhead Ogg muxing | 18 | - low overhead Ogg muxing |
| 14 | - MMS-TCP support | 19 | - MMS-TCP support |
| @@ -93,6 +93,7 @@ tools/%.o: tools/%.c · 92 unmodified lines | |||
| 93 | $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $< | 93 | $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $< |
| 94 | 94 | ||
| 95 | -include $(wildcard tools/*.d) | 95 | -include $(wildcard tools/*.d) |
| 96 | -include $(wildcard tests/*.d) | ||
| 96 | 97 | ||
| 97 | ffplay.o: CFLAGS += $(SDL_CFLAGS) | 98 | ffplay.o: CFLAGS += $(SDL_CFLAGS) |
| 98 | 99 | ||
| @@ -1,13 +1,13 @@ | |||
| 1 | Never assume the API of libav* to be stable unless at least 1 week has passed since | 1 | Never assume the API of libav* to be stable unless at least 1 week has passed since |
| 2 | the last major version increase. | 2 | the last major version increase. |
| 3 | The last version increases were: | 3 | The last version increases were: |
| 4 | libavcodec: ? | 4 | libavcodec: 2011-04-18 |
| 5 | libavdevice: ? | 5 | libavdevice: 2011-04-18 |
| 6 | libavfilter: 2009-10-18 | 6 | libavfilter: 2011-04-18 |
| 7 | libavformat: ? | 7 | libavformat: 2011-04-18 |
| 8 | libpostproc: ? | 8 | libpostproc: 2011-04-18 |
| 9 | libswscale: ? | 9 | libswscale: 2011-04-18 |
| 10 | libavutil: 2009-03-08 | 10 | libavutil: 2011-04-18 |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | API changes, most recent first: | 13 | API changes, most recent first: |
| @@ -195,7 +195,7 @@ static int applehttp_open(URLContext *h, const char *uri, int flags) · 194 unmodified lines | |||
| 195 | av_strlcpy(s->playlisturl, "http://", sizeof(s->playlisturl)); | 195 | av_strlcpy(s->playlisturl, "http://", sizeof(s->playlisturl)); |
| 196 | av_strlcat(s->playlisturl, nested_url, sizeof(s->playlisturl)); | 196 | av_strlcat(s->playlisturl, nested_url, sizeof(s->playlisturl)); |
| 197 | } else { | 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 | ret = AVERROR(EINVAL); | 199 | ret = AVERROR(EINVAL); |
| 200 | goto fail; | 200 | goto fail; |
| 201 | } | 201 | } |
| @@ -218,7 +218,7 @@ static int applehttp_open(URLContext *h, const char *uri, int flags) · 16 unmodified lines | |||
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | if (s->n_segments == 0) { | 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 | ret = AVERROR(EIO); | 222 | ret = AVERROR(EIO); |
| 223 | goto fail; | 223 | goto fail; |
| 224 | } | 224 | } |
| @@ -258,7 +258,7 @@ retry: · 33 unmodified lines | |||
| 258 | return ret; | 258 | return ret; |
| 259 | } | 259 | } |
| 260 | if (s->cur_seq_no < s->start_seq_no) { | 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 | "skipping %d segments ahead, expired from playlist\n", | 262 | "skipping %d segments ahead, expired from playlist\n", |
| 263 | s->start_seq_no - s->cur_seq_no); | 263 | s->start_seq_no - s->cur_seq_no); |
| 264 | s->cur_seq_no = s->start_seq_no; | 264 | s->cur_seq_no = s->start_seq_no; |
| @@ -274,12 +274,12 @@ retry: · 9 unmodified lines | |||
| 274 | goto retry; | 274 | goto retry; |
| 275 | } | 275 | } |
| 276 | url = s->segments[s->cur_seq_no - s->start_seq_no]->url, | 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 | ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ); | 278 | ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ); |
| 279 | if (ret < 0) { | 279 | if (ret < 0) { |
| 280 | if (url_interrupt_cb()) | 280 | if (url_interrupt_cb()) |
| 281 | return AVERROR_EXIT; | 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 | s->cur_seq_no++; | 283 | s->cur_seq_no++; |
| 284 | goto retry; | 284 | goto retry; |
| 285 | } | 285 | } |
| @@ -1262,27 +1262,6 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int · 1261 unmodified lines | |||
| 1262 | /* find the position */ | 1262 | /* find the position */ |
| 1263 | pos = st->index_entries[index].pos; | 1263 | pos = st->index_entries[index].pos; |
| 1264 | 1264 | ||
| 1265 | // various attempts to find key frame have failed so far | ||
| 1266 | // asf_reset_header(s); | ||
| 1267 | // avio_seek(s->pb, pos, SEEK_SET); | ||
| 1268 | // key_pos = pos; | ||
| 1269 | // for(i=0;i<16;i++){ | ||
| 1270 | // pos = avio_tell(s->pb); | ||
| 1271 | // if (av_read_frame(s, &pkt) < 0){ | ||
| 1272 | // av_log(s, AV_LOG_INFO, "seek failed\n"); | ||
| 1273 | // return -1; | ||
| 1274 | // } | ||
| 1275 | // asf_st = s->streams[stream_index]->priv_data; | ||
| 1276 | // pos += st->parser->frame_offset; | ||
| 1277 | // | ||
| 1278 | // if (pkt.size > b) { | ||
| 1279 | // b = pkt.size; | ||
| 1280 | // key_pos = pos; | ||
| 1281 | // } | ||
| 1282 | // | ||
| 1283 | // av_free_packet(&pkt); | ||
| 1284 | // } | ||
| 1285 | |||
| 1286 | /* do the seek */ | 1265 | /* do the seek */ |
| 1287 | av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos); | 1266 | av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos); |
| 1288 | avio_seek(s->pb, pos, SEEK_SET); | 1267 | avio_seek(s->pb, pos, SEEK_SET); |
| @@ -50,7 +50,7 @@ static int gopher_connect(URLContext *h, const char *path) · 49 unmodified lines | |||
| 50 | if (!path) return AVERROR(EINVAL); | 50 | if (!path) return AVERROR(EINVAL); |
| 51 | break; | 51 | break; |
| 52 | default: | 52 | default: |
| 53 | av_log(NULL, AV_LOG_WARNING, | 53 | av_log(h, AV_LOG_WARNING, |
| 54 | "Gopher protocol type '%c' not supported yet!\n", | 54 | "Gopher protocol type '%c' not supported yet!\n", |
| 55 | *path); | 55 | *path); |
| 56 | return AVERROR(EINVAL); | 56 | return AVERROR(EINVAL); |
| @@ -70,7 +70,7 @@ void ff_http_set_headers(URLContext *h, const char *headers) · 69 unmodified lines | |||
| 70 | int len = strlen(headers); | 70 | int len = strlen(headers); |
| 71 | 71 | ||
| 72 | if (len && strcmp("\r\n", headers + len - 2)) | 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 | av_strlcpy(s->headers, headers, sizeof(s->headers)); | 75 | av_strlcpy(s->headers, headers, sizeof(s->headers)); |
| 76 | } | 76 | } |
| @@ -232,7 +232,7 @@ static int process_line(URLContext *h, char *line, int line_count, · 155 unmodified lines | |||
| 232 | * don't abort until all headers have been parsed. */ | 232 | * don't abort until all headers have been parsed. */ |
| 233 | if (s->http_code >= 400 && s->http_code < 600 && s->http_code != 401) { | 233 | if (s->http_code >= 400 && s->http_code < 600 && s->http_code != 401) { |
| 234 | end += strspn(end, SPACE_CHARS); | 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 | s->http_code, end); | 236 | s->http_code, end); |
| 237 | return -1; | 237 | return -1; |
| 238 | } | 238 | } |
| @@ -64,7 +64,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 63 unmodified lines | |||
| 64 | snprintf(portstr, sizeof(portstr), "%d", port); | 64 | snprintf(portstr, sizeof(portstr), "%d", port); |
| 65 | ret = getaddrinfo(hostname, portstr, &hints, &ai); | 65 | ret = getaddrinfo(hostname, portstr, &hints, &ai); |
| 66 | if (ret) { | 66 | if (ret) { |
| 67 | av_log(NULL, AV_LOG_ERROR, | 67 | av_log(h, AV_LOG_ERROR, |
| 68 | "Failed to resolve hostname %s: %s\n", | 68 | "Failed to resolve hostname %s: %s\n", |
| 69 | hostname, gai_strerror(ret)); | 69 | hostname, gai_strerror(ret)); |
| 70 | return AVERROR(EIO); | 70 | return AVERROR(EIO); |
| @@ -126,7 +126,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 55 unmodified lines | |||
| 126 | optlen = sizeof(ret); | 126 | optlen = sizeof(ret); |
| 127 | getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); | 127 | getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); |
| 128 | if (ret != 0) { | 128 | if (ret != 0) { |
| 129 | av_log(NULL, AV_LOG_ERROR, | 129 | av_log(h, AV_LOG_ERROR, |
| 130 | "TCP connection to %s:%d failed: %s\n", | 130 | "TCP connection to %s:%d failed: %s\n", |
| 131 | hostname, port, strerror(ret)); | 131 | hostname, port, strerror(ret)); |
| 132 | goto fail; | 132 | goto fail; |
| @@ -266,7 +266,7 @@ int ff_udp_set_remote_url(URLContext *h, const char *uri) · 265 unmodified lines | |||
| 266 | if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr, | 266 | if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr, |
| 267 | s->dest_addr_len)) { | 267 | s->dest_addr_len)) { |
| 268 | s->is_connected = 0; | 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 | return AVERROR(EIO); | 270 | return AVERROR(EIO); |
| 271 | } | 271 | } |
| 272 | } | 272 | } |
| @@ -410,7 +410,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 137 unmodified lines | |||
| 410 | /* limit the tx buf size to limit latency */ | 410 | /* limit the tx buf size to limit latency */ |
| 411 | tmp = s->buffer_size; | 411 | tmp = s->buffer_size; |
| 412 | if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) { | 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 | goto fail; | 414 | goto fail; |
| 415 | } | 415 | } |
| 416 | } else { | 416 | } else { |
| @@ -418,14 +418,14 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 1 unmodified line | |||
| 418 | * avoid losing data on OSes that set this too low by default. */ | 418 | * avoid losing data on OSes that set this too low by default. */ |
| 419 | tmp = s->buffer_size; | 419 | tmp = s->buffer_size; |
| 420 | if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) { | 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 | /* make the socket non-blocking */ | 423 | /* make the socket non-blocking */ |
| 424 | ff_socket_nonblock(udp_fd, 1); | 424 | ff_socket_nonblock(udp_fd, 1); |
| 425 | } | 425 | } |
| 426 | if (s->is_connected) { | 426 | if (s->is_connected) { |
| 427 | if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) { | 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 | goto fail; | 429 | goto fail; |
| 430 | } | 430 | } |
| 431 | } | 431 | } |
| @@ -2586,6 +2586,7 @@ void avformat_free_context(AVFormatContext *s) · 2585 unmodified lines | |||
| 2586 | av_freep(&s->chapters); | 2586 | av_freep(&s->chapters); |
| 2587 | av_metadata_free(&s->metadata); | 2587 | av_metadata_free(&s->metadata); |
| 2588 | av_freep(&s->key); | 2588 | av_freep(&s->key); |
| 2589 | av_freep(&s->streams); | ||
| 2589 | av_free(s); | 2590 | av_free(s); |
| 2590 | } | 2591 | } |
| 2591 | 2592 | ||
| @@ -35,7 +35,6 @@ HEADERS = adler32.h \ · 34 unmodified lines | |||
| 35 | rational.h \ | 35 | rational.h \ |
| 36 | samplefmt.h \ | 36 | samplefmt.h \ |
| 37 | sha.h \ | 37 | sha.h \ |
| 38 | sha1.h \ | ||
| 39 | 38 | ||
| 40 | BUILT_HEADERS = avconfig.h | 39 | BUILT_HEADERS = avconfig.h |
| 41 | 40 | ||
| @@ -100,7 +100,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) · 99 unmodified lines | |||
| 100 | line[0]=0; | 100 | line[0]=0; |
| 101 | #undef fprintf | 101 | #undef fprintf |
| 102 | if(print_prefix && avc) { | 102 | if(print_prefix && avc) { |
| 103 | if(avc->version >= (50<<16 | 15<<8 | 3) && avc->parent_log_context_offset){ | 103 | if (avc->parent_log_context_offset) { |
| 104 | AVClass** parent= *(AVClass***)(((uint8_t*)ptr) + avc->parent_log_context_offset); | 104 | AVClass** parent= *(AVClass***)(((uint8_t*)ptr) + avc->parent_log_context_offset); |
| 105 | if(parent && *parent){ | 105 | if(parent && *parent){ |
| 106 | snprintf(line, sizeof(line), "[%s @ %p] ", (*parent)->item_name(parent), parent); | 106 | snprintf(line, sizeof(line), "[%s @ %p] ", (*parent)->item_name(parent), parent); |
| @@ -80,11 +80,3 @@ uint32_t av_get_random_seed(void) · 79 unmodified lines | |||
| 80 | return seed; | 80 | return seed; |
| 81 | return get_generic_seed(); | 81 | return get_generic_seed(); |
| 82 | } | 82 | } |
| 83 | |||
| 84 | #if LIBAVUTIL_VERSION_MAJOR < 51 | ||
| 85 | attribute_deprecated uint32_t ff_random_get_seed(void); | ||
| 86 | uint32_t ff_random_get_seed(void) | ||
| 87 | { | ||
| 88 | return av_get_random_seed(); | ||
| 89 | } | ||
| 90 | #endif | ||
| @@ -25,7 +25,6 @@ · 24 unmodified lines | |||
| 25 | #include "avutil.h" | 25 | #include "avutil.h" |
| 26 | #include "bswap.h" | 26 | #include "bswap.h" |
| 27 | #include "sha.h" | 27 | #include "sha.h" |
| 28 | #include "sha1.h" | ||
| 29 | #include "intreadwrite.h" | 28 | #include "intreadwrite.h" |
| 30 | 29 | ||
| 31 | /** hash context */ | 30 | /** hash context */ |
| @@ -324,29 +323,6 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest) · 292 unmodified lines | |||
| 324 | AV_WB32(digest + i*4, ctx->state[i]); | 323 | AV_WB32(digest + i*4, ctx->state[i]); |
| 325 | } | 324 | } |
| 326 | 325 | ||
| 327 | #if LIBAVUTIL_VERSION_MAJOR < 51 | ||
| 328 | struct AVSHA1 { | ||
| 329 | AVSHA sha; | ||
| 330 | }; | ||
| 331 | |||
| 332 | const int av_sha1_size = sizeof(struct AVSHA1); | ||
| 333 | |||
| 334 | void av_sha1_init(struct AVSHA1* context) | ||
| 335 | { | ||
| 336 | av_sha_init(&context->sha, 160); | ||
| 337 | } | ||
| 338 | |||
| 339 | void av_sha1_update(struct AVSHA1* context, const uint8_t* data, unsigned int len) | ||
| 340 | { | ||
| 341 | av_sha_update(&context->sha, data, len); | ||
| 342 | } | ||
| 343 | |||
| 344 | void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]) | ||
| 345 | { | ||
| 346 | av_sha_final(&context->sha, digest); | ||
| 347 | } | ||
| 348 | #endif | ||
| 349 | |||
| 350 | #ifdef TEST | 326 | #ifdef TEST |
| 351 | #include <stdio.h> | 327 | #include <stdio.h> |
| 352 | #undef printf | 328 | #undef printf |
| @@ -1,57 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Michael Niedermayer <michaelni@gmx.at> | ||
| 3 | * | ||
| 4 | * This file is part of FFmpeg. | ||
| 5 | * | ||
| 6 | * FFmpeg is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with FFmpeg; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef AVUTIL_SHA1_H | ||
| 22 | #define AVUTIL_SHA1_H | ||
| 23 | |||
| 24 | #include <stdint.h> | ||
| 25 | |||
| 26 | extern const int av_sha1_size; | ||
| 27 | |||
| 28 | struct AVSHA1; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Initialize SHA-1 hashing. | ||
| 32 | * | ||
| 33 | * @param context pointer to the function context (of size av_sha_size) | ||
| 34 | * @deprecated use av_sha_init() instead | ||
| 35 | */ | ||
| 36 | void av_sha1_init(struct AVSHA1* context); | ||
| 37 | |||
| 38 | /** | ||
| 39 | * Update hash value. | ||
| 40 | * | ||
| 41 | * @param context hash function context | ||
| 42 | * @param data input data to update hash with | ||
| 43 | * @param len input data length | ||
| 44 | * @deprecated use av_sha_update() instead | ||
| 45 | */ | ||
| 46 | void av_sha1_update(struct AVSHA1* context, const uint8_t* data, unsigned int len); | ||
| 47 | |||
| 48 | /** | ||
| 49 | * Finish hashing and output digest value. | ||
| 50 | * | ||
| 51 | * @param context hash function context | ||
| 52 | * @param digest buffer where output digest value is stored | ||
| 53 | * @deprecated use av_sha_final() instead | ||
| 54 | */ | ||
| 55 | void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]); | ||
| 56 | |||
| 57 | #endif /* AVUTIL_SHA1_H */ | ||