[FFmpeg-devel] [PATCH] h264: allocate PPS and SPS dynamically
Michael Niedermayer
michaelni
Tue May 29 01:59:12 CEST 2007
Hi
On Mon, May 28, 2007 at 05:21:26PM +0200, Andreas ?man wrote:
> Hi
>
> Michael Niedermayer wrote:
> >Hi
> >
> >On Mon, May 28, 2007 at 03:27:56PM +0200, Andreas ?man wrote:
> >>Hi
> >>
> >>Are you referring to that the "const int id" argument to
> >>alloc_parameter_set() is not unsigned?
> >
> >yes
> >
>
> Here's an updated version
[...]
> + x = vec[id];
> + if(x == NULL) {
> + x = av_mallocz(size);
> + if(x == NULL) {
> + av_log(h->s.avctx, AV_LOG_ERROR, "cannot allocate memory for %s\n", name);
> + return NULL;
> + }
> + vec[id] = x;
> + }
> + return x;
if(!vec[id]){
vec[id]= av_mallocz(size);
if(!vec[id])
av_log
}
return vec[id];
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070529/b8befed3/attachment.pgp>
More information about the ffmpeg-devel
mailing list