Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
Hello Di Wu On 10/15/2014 05:24 AM, di1028...@samsung.com wrote: From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. [..] Thanks for your patch. Can you spell check your commit summary though?, you have at least two typos there. Thanks, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
On Wed, 15 Oct 2014, di1028...@samsung.com wrote: From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid LGTM, thanks. Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
On Wed, Oct 15, 2014 at 11:05:29PM +0200, Marton Balint wrote: On Wed, 15 Oct 2014, di1028...@samsung.com wrote: From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid LGTM, thanks. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel