[FFmpeg-cvslog] r15414 - trunk/libavcodec/h264.c
michael
subversion
Thu Sep 25 21:01:39 CEST 2008
Author: michael
Date: Thu Sep 25 21:01:39 2008
New Revision: 15414
Log:
Do not free sps & pps on width/height changes.
Fixes issue557.
Modified:
trunk/libavcodec/h264.c
Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c (original)
+++ trunk/libavcodec/h264.c Thu Sep 25 21:01:39 2008
@@ -2034,12 +2034,6 @@ static void free_tables(H264Context *h){
av_freep(&h->mb2b_xy);
av_freep(&h->mb2b8_xy);
- for(i = 0; i < MAX_SPS_COUNT; i++)
- av_freep(h->sps_buffers + i);
-
- for(i = 0; i < MAX_PPS_COUNT; i++)
- av_freep(h->pps_buffers + i);
-
for(i = 0; i < h->s.avctx->thread_count; i++) {
hx = h->thread_context[i];
if(!hx) continue;
@@ -7920,10 +7914,18 @@ static av_cold int decode_end(AVCodecCon
{
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
+ int i;
av_freep(&h->rbsp_buffer[0]);
av_freep(&h->rbsp_buffer[1]);
free_tables(h); //FIXME cleanup init stuff perhaps
+
+ for(i = 0; i < MAX_SPS_COUNT; i++)
+ av_freep(h->sps_buffers + i);
+
+ for(i = 0; i < MAX_PPS_COUNT; i++)
+ av_freep(h->pps_buffers + i);
+
MPV_common_end(s);
// memset(h, 0, sizeof(H264Context));
More information about the ffmpeg-cvslog
mailing list