History

Merge remote-tracking branch 'qatar/master'

* 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

Michael Niedermayer committed 14 years ago

Commit 7b0b10c2 parents 8b08f81 04403ec42 files · +466 −491Browse files

Showing the changes to libavformat/cache.c (1 of 42 files). Show all

Unified · Split

libavformat/cache.c+2−9
@@ -53,13 +53,7 @@ static int cache_open(URLContext *h, const char *arg, int flags) · 52 unmodified lines
5353 {
5454 int access;
5555 const char *buffername;
56− Context *c;
57−
58− c = av_mallocz(sizeof(Context));
59− if (!c) {
60− return AVERROR(ENOMEM);
61− }
62− h->priv_data = c;
56+ Context *c= h->priv_data;
6357
6458 av_strstart(arg, "cache:", &arg);
6559
@@ -130,8 +124,6 @@ static int cache_close(URLContext *h) · 64 unmodified lines
130124 close(c->fd);
131125 ffurl_close(c->inner);
132126
133− av_freep(&h->priv_data);
134−
135127 return 0;
136128 }
137129
@@ -141,4 +133,5 @@ URLProtocol ff_cache_protocol = { · 3 unmodified lines
141133 .url_read = cache_read,
142134 .url_seek = cache_seek,
143135 .url_close = cache_close,
136+ .priv_data_size = sizeof(Context),
144137 };

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