summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-26 10:32:45 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-26 10:32:45 +0000
commit289df76b58d3d2e60a681a68e7c0eccd62ca0a3c (patch)
tree775038408775593fc22acb355bbed7ca0eb8b586 /libmpcodecs
parent6744b62fc03da3b45b028e3941e37605ac26e36d (diff)
downloadmpv-289df76b58d3d2e60a681a68e7c0eccd62ca0a3c.tar.bz2
mpv-289df76b58d3d2e60a681a68e7c0eccd62ca0a3c.tar.xz
segfault fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9992 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 9d5a68399a..87f87263ee 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -394,7 +394,13 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
| (ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0);
}
- if(init_vo(sh)<0 || ctx->b_count>1 || ctx->ip_count>2){
+ if(init_vo(sh)<0){
+ avctx->release_buffer= avcodec_default_release_buffer;
+ avctx->get_buffer= avcodec_default_get_buffer;
+ return avctx->get_buffer(avctx, pic);
+ }
+
+ if(ctx->b_count>1 || ctx->ip_count>2){
printf("DR1 failure\n");
ctx->do_dr1=0; //FIXME