From b08b2fbd1c38e295a36d8a7d007f75deb9018897 Mon Sep 17 00:00:00 2001 From: smorlat Date: Wed, 15 Oct 2008 19:28:49 +0000 Subject: [PATCH] fix bug when re-initializing the decoder when a new sps arrives. git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@93 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/mediastreamer2/plugins/msx264/src/msx264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linphone/mediastreamer2/plugins/msx264/src/msx264.c b/linphone/mediastreamer2/plugins/msx264/src/msx264.c index 491124eef..b657523c5 100644 --- a/linphone/mediastreamer2/plugins/msx264/src/msx264.c +++ b/linphone/mediastreamer2/plugins/msx264/src/msx264.c @@ -361,7 +361,8 @@ static void update_sps(DecData *d, mblk_t *sps){ static void update_pps(DecData *d, mblk_t *pps){ if (d->pps) freemsg(d->pps); - d->pps=dupb(pps); + if (pps) d->pps=dupb(pps); + else d->pps=NULL; } static bool_t check_sps_pps_change(DecData *d, mblk_t *sps, mblk_t *pps){ @@ -372,6 +373,7 @@ static bool_t check_sps_pps_change(DecData *d, mblk_t *sps, mblk_t *pps){ if (ret1) { update_sps(d,sps); ms_message("SPS changed !"); + update_pps(d,NULL); } } }else if (sps) {