[MPlayer-cvslog] r35348 - trunk/libmpdemux/demux_ts.c
reimar
subversion at mplayerhq.hu
Mon Nov 5 21:51:45 CET 2012
Author: reimar
Date: Mon Nov 5 21:51:45 2012
New Revision: 35348
Log:
Fix crash in case sh_audio allocation failed.
Modified:
trunk/libmpdemux/demux_ts.c
Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c Mon Nov 5 21:45:40 2012 (r35347)
+++ trunk/libmpdemux/demux_ts.c Mon Nov 5 21:51:45 2012 (r35348)
@@ -360,13 +360,13 @@ static void ts_add_stream(demuxer_t * de
priv->ts.streams[es->pid].type = TYPE_AUDIO;
mp_msg(MSGT_DEMUX, MSGL_V, "\r\nADDED AUDIO PID %d, type: %x stream n. %d\r\n", es->pid, sh->format, priv->last_aid);
priv->last_aid++;
- }
- if(es->extradata && es->extradata_len)
- {
- sh->wf = malloc(sizeof(*sh->wf) + es->extradata_len);
- sh->wf->cbSize = es->extradata_len;
- memcpy(sh->wf + 1, es->extradata, es->extradata_len);
+ if(es->extradata && es->extradata_len)
+ {
+ sh->wf = malloc(sizeof(*sh->wf) + es->extradata_len);
+ sh->wf->cbSize = es->extradata_len;
+ memcpy(sh->wf + 1, es->extradata, es->extradata_len);
+ }
}
}
More information about the MPlayer-cvslog
mailing list