History

Merge remote branch 'qatar/master'

* 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

Michael Niedermayer committed 15 years ago

Commit 10d2ae82 parents 2c18893 f83acb015 files · +29 −133Browse files

Unified · Split

15 files
  1. Changelog +5 −0
  2. Makefile +1 −0
  3. doc/APIchanges +7 −7
  4. libavformat/applehttpproto.c +5 −5
  5. libavformat/asfdec.c +0 −21
  6. libavformat/gopher.c +1 −1
  7. libavformat/http.c +2 −2
  8. libavformat/tcp.c +2 −2
  9. libavformat/udp.c +4 −4
  10. libavformat/utils.c +1 −0
  11. libavutil/Makefile +0 −1
  12. libavutil/log.c +1 −1
  13. libavutil/random_seed.c +0 −8
  14. libavutil/sha.c +0 −24
  15. libavutil/sha1.h +0 −57
Changelog+5−0
@@ -9,6 +9,11 @@ version <next>: · 8 unmodified lines
99 - mpeg2 aspect ratio dection fixed
1010 - libxvid aspect pickiness fixed
1111 - Frame multithreaded decoding
12+- Lots of deprecated API cruft removed
13+
14+
15+version 0.7_beta1:
16+
1217 - WebM support in Matroska de/muxer
1318 - low overhead Ogg muxing
1419 - MMS-TCP support
Makefile+1−0
@@ -93,6 +93,7 @@ tools/%.o: tools/%.c · 92 unmodified lines
9393 $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
9494
9595 -include $(wildcard tools/*.d)
96+-include $(wildcard tests/*.d)
9697
9798 ffplay.o: CFLAGS += $(SDL_CFLAGS)
9899
doc/APIchanges+7−7
@@ -1,13 +1,13 @@
11 Never assume the API of libav* to be stable unless at least 1 week has passed since
22 the last major version increase.
33 The last version increases were:
4−libavcodec: ?
5−libavdevice: ?
6−libavfilter: 2009-10-18
7−libavformat: ?
8−libpostproc: ?
9−libswscale: ?
10−libavutil: 2009-03-08
4+libavcodec: 2011-04-18
5+libavdevice: 2011-04-18
6+libavfilter: 2011-04-18
7+libavformat: 2011-04-18
8+libpostproc: 2011-04-18
9+libswscale: 2011-04-18
10+libavutil: 2011-04-18
1111
1212
1313 API changes, most recent first:
libavformat/applehttpproto.c+5−5
@@ -195,7 +195,7 @@ static int applehttp_open(URLContext *h, const char *uri, int flags) · 194 unmodified lines
195195 av_strlcpy(s->playlisturl, "http://", sizeof(s->playlisturl));
196196 av_strlcat(s->playlisturl, nested_url, sizeof(s->playlisturl));
197197 } 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);
199199 ret = AVERROR(EINVAL);
200200 goto fail;
201201 }
@@ -218,7 +218,7 @@ static int applehttp_open(URLContext *h, const char *uri, int flags) · 16 unmodified lines
218218 }
219219
220220 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");
222222 ret = AVERROR(EIO);
223223 goto fail;
224224 }
@@ -258,7 +258,7 @@ retry: · 33 unmodified lines
258258 return ret;
259259 }
260260 if (s->cur_seq_no < s->start_seq_no) {
261− av_log(NULL, AV_LOG_WARNING,
261+ av_log(h, AV_LOG_WARNING,
262262 "skipping %d segments ahead, expired from playlist\n",
263263 s->start_seq_no - s->cur_seq_no);
264264 s->cur_seq_no = s->start_seq_no;
@@ -274,12 +274,12 @@ retry: · 9 unmodified lines
274274 goto retry;
275275 }
276276 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);
278278 ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ);
279279 if (ret < 0) {
280280 if (url_interrupt_cb())
281281 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);
283283 s->cur_seq_no++;
284284 goto retry;
285285 }
libavformat/asfdec.c+0−21
@@ -1262,27 +1262,6 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int · 1261 unmodified lines
12621262 /* find the position */
12631263 pos = st->index_entries[index].pos;
12641264
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−
12861265 /* do the seek */
12871266 av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos);
12881267 avio_seek(s->pb, pos, SEEK_SET);
libavformat/gopher.c+1−1
@@ -50,7 +50,7 @@ static int gopher_connect(URLContext *h, const char *path) · 49 unmodified lines
5050 if (!path) return AVERROR(EINVAL);
5151 break;
5252 default:
53− av_log(NULL, AV_LOG_WARNING,
53+ av_log(h, AV_LOG_WARNING,
5454 "Gopher protocol type '%c' not supported yet!\n",
5555 *path);
5656 return AVERROR(EINVAL);
libavformat/http.c+2−2
@@ -70,7 +70,7 @@ void ff_http_set_headers(URLContext *h, const char *headers) · 69 unmodified lines
7070 int len = strlen(headers);
7171
7272 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");
7474
7575 av_strlcpy(s->headers, headers, sizeof(s->headers));
7676 }
@@ -232,7 +232,7 @@ static int process_line(URLContext *h, char *line, int line_count, · 155 unmodified lines
232232 * don't abort until all headers have been parsed. */
233233 if (s->http_code >= 400 && s->http_code < 600 && s->http_code != 401) {
234234 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",
236236 s->http_code, end);
237237 return -1;
238238 }
libavformat/tcp.c+2−2
@@ -64,7 +64,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 63 unmodified lines
6464 snprintf(portstr, sizeof(portstr), "%d", port);
6565 ret = getaddrinfo(hostname, portstr, &hints, &ai);
6666 if (ret) {
67− av_log(NULL, AV_LOG_ERROR,
67+ av_log(h, AV_LOG_ERROR,
6868 "Failed to resolve hostname %s: %s\n",
6969 hostname, gai_strerror(ret));
7070 return AVERROR(EIO);
@@ -126,7 +126,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) · 55 unmodified lines
126126 optlen = sizeof(ret);
127127 getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
128128 if (ret != 0) {
129− av_log(NULL, AV_LOG_ERROR,
129+ av_log(h, AV_LOG_ERROR,
130130 "TCP connection to %s:%d failed: %s\n",
131131 hostname, port, strerror(ret));
132132 goto fail;
libavformat/udp.c+4−4
@@ -266,7 +266,7 @@ int ff_udp_set_remote_url(URLContext *h, const char *uri) · 265 unmodified lines
266266 if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr,
267267 s->dest_addr_len)) {
268268 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));
270270 return AVERROR(EIO);
271271 }
272272 }
@@ -410,7 +410,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 137 unmodified lines
410410 /* limit the tx buf size to limit latency */
411411 tmp = s->buffer_size;
412412 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));
414414 goto fail;
415415 }
416416 } else {
@@ -418,14 +418,14 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 1 unmodified line
418418 * avoid losing data on OSes that set this too low by default. */
419419 tmp = s->buffer_size;
420420 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));
422422 }
423423 /* make the socket non-blocking */
424424 ff_socket_nonblock(udp_fd, 1);
425425 }
426426 if (s->is_connected) {
427427 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));
429429 goto fail;
430430 }
431431 }
libavformat/utils.c+1−0
@@ -2586,6 +2586,7 @@ void avformat_free_context(AVFormatContext *s) · 2585 unmodified lines
25862586 av_freep(&s->chapters);
25872587 av_metadata_free(&s->metadata);
25882588 av_freep(&s->key);
2589+ av_freep(&s->streams);
25892590 av_free(s);
25902591 }
25912592
libavutil/Makefile+0−1
@@ -35,7 +35,6 @@ HEADERS = adler32.h \ · 34 unmodified lines
3535 rational.h \
3636 samplefmt.h \
3737 sha.h \
38− sha1.h \
3938
4039 BUILT_HEADERS = avconfig.h
4140
libavutil/log.c+1−1
@@ -100,7 +100,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) · 99 unmodified lines
100100 line[0]=0;
101101 #undef fprintf
102102 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) {
104104 AVClass** parent= *(AVClass***)(((uint8_t*)ptr) + avc->parent_log_context_offset);
105105 if(parent && *parent){
106106 snprintf(line, sizeof(line), "[%s @ %p] ", (*parent)->item_name(parent), parent);
libavutil/random_seed.c+0−8
@@ -80,11 +80,3 @@ uint32_t av_get_random_seed(void) · 79 unmodified lines
8080 return seed;
8181 return get_generic_seed();
8282 }
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
libavutil/sha.c+0−24
@@ -25,7 +25,6 @@ · 24 unmodified lines
2525 #include "avutil.h"
2626 #include "bswap.h"
2727 #include "sha.h"
28−#include "sha1.h"
2928 #include "intreadwrite.h"
3029
3130 /** hash context */
@@ -324,29 +323,6 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest) · 292 unmodified lines
324323 AV_WB32(digest + i*4, ctx->state[i]);
325324 }
326325
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−
350326 #ifdef TEST
351327 #include <stdio.h>
352328 #undef printf
libavutil/sha1.h+0−57
@@ -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 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t