Mercurial > libavcodec.hg
changeset 1311:fc858abf6b10 libavcodec
fixed segfault if sequence header has not been found before slice decoding
author | bellard |
---|---|
date | Mon, 16 Jun 2003 14:09:18 +0000 |
parents | b76927543aaf |
children | 899c8f52094c |
files | mpeg12.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg12.c Mon Jun 16 13:19:30 2003 +0000 +++ b/mpeg12.c Mon Jun 16 14:09:18 2003 +0000 @@ -1990,6 +1990,9 @@ Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; + if (!s1->mpeg_enc_ctx_allocated) + return 0; + /* end of slice reached */ if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) { /* end of image */