* qatar/master: (25 commits) rtpenc: Add support for G726 audio rtpdec: Interpret the different G726 names as bits_per_coded_sample rtpenc: Change rtp_send_samples to handle sample sizes other than even bytes rtpenc: Cast a rescaling parameter to int64_t h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1. ARM: fix indentation in ff_dsputil_init_neon() ARM: NEON put/avg_pixels8/16 cosmetics ARM: add remaining NEON avg_pixels8/16 functions ARM: clean up NEON put/avg_pixels macros fate: split acodec-pcm into individual tests swscale: #include "libavutil/mathematics.h" pmpdec: don't use deprecated av_set_pts_info. rv34: align temporary block of "dct" coefs Add PlayStation Portable PMP format demuxer proto: Realign struct initializers proto: Use .priv_data_size to allocate the private context mmsh: Properly clean up if the second ffurl_alloc failed rtmp: Clean up properly if the handshake failed md5proto: Remove the get_file_handle function applehttpproto: Use the close function if the open function fails ... Conflicts: libavcodec/vble.c libavformat/mmsh.c libavformat/pmpdec.c libavformat/udp.c tests/ref/acodec/pcm
Showing the changes to libavformat/cache.c (1 of 42 files). Show all
Unified · Split
| @@ -53,13 +53,7 @@ static int cache_open(URLContext *h, const char *arg, int flags) · 52 unmodified lines | |||
| 53 | { | 53 | { |
| 54 | int access; | 54 | int access; |
| 55 | const char *buffername; | 55 | const char *buffername; |
| 56 | Context *c; | 56 | Context *c= h->priv_data; |
| 57 | |||
| 58 | c = av_mallocz(sizeof(Context)); | ||
| 59 | if (!c) { | ||
| 60 | return AVERROR(ENOMEM); | ||
| 61 | } | ||
| 62 | h->priv_data = c; | ||
| 63 | 57 | ||
| 64 | av_strstart(arg, "cache:", &arg); | 58 | av_strstart(arg, "cache:", &arg); |
| 65 | 59 | ||
| @@ -130,8 +124,6 @@ static int cache_close(URLContext *h) · 64 unmodified lines | |||
| 130 | close(c->fd); | 124 | close(c->fd); |
| 131 | ffurl_close(c->inner); | 125 | ffurl_close(c->inner); |
| 132 | 126 | ||
| 133 | av_freep(&h->priv_data); | ||
| 134 | |||
| 135 | return 0; | 127 | return 0; |
| 136 | } | 128 | } |
| 137 | 129 | ||
| @@ -141,4 +133,5 @@ URLProtocol ff_cache_protocol = { · 3 unmodified lines | |||
| 141 | .url_read = cache_read, | 133 | .url_read = cache_read, |
| 142 | .url_seek = cache_seek, | 134 | .url_seek = cache_seek, |
| 143 | .url_close = cache_close, | 135 | .url_close = cache_close, |
| 136 | .priv_data_size = sizeof(Context), | ||
| 144 | }; | 137 | }; |