[FFmpeg-cvslog] vp9: enable multi-thread decoding when refreshctx is equal to 0

2014-10-10 Thread Di Wu
ffmpeg | branch: master | Di Wu  | Sun Oct 12 01:20:18 
2014 +0800| [162b5211080b187fc8a2e8393b7fa07207c1611e] | committer: Reynaldo H. 
Verdejo Pinochet

vp9: enable multi-thread decoding when refreshctx is equal to 0

In vp9_decode_frame function, ff_thread_finish_setup is not called
when refreshctx is equal to 0, and the next decoding thread can not
start work until the cunrrent frame has been decoded completely. So
ff_thread_finish_setup needs to be called to enable Multi-thread
decoding in this condition.

Signed-off-by: Di Wu 
Signed-off-by: Reynaldo H. Verdejo Pinochet 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=162b5211080b187fc8a2e8393b7fa07207c1611e
---

 libavcodec/vp9.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 76fd372..7b7deb3 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3826,6 +3826,8 @@ static int vp9_decode_frame(AVCodecContext *ctx, void 
*frame,
 }
 s->prob_ctx[s->framectxid].p = s->prob.p;
 ff_thread_finish_setup(ctx);
+} else if (!s->refreshctx) {
+ff_thread_finish_setup(ctx);
 }
 
 do {

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] mpegts: add the judgement if a new program is created successfully

2014-10-15 Thread Di Wu
ffmpeg | branch: master | Di Wu  | Wed Oct 15 16:24:21 
2014 +0800| [0e406aba14a89e94b31afde02b6bc0f456b113f5] | committer: Michael 
Niedermayer

mpegts: add the judgement if a new program is created successfully

Add the judement after create a new program to avoid segment fault.

Signed-off-by: Di Wu 
Reviewed-by: Marton Balint 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e406aba14a89e94b31afde02b6bc0f456b113f5
---

 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

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog