comparison mpeg12.c @ 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 57172377849a
children e9da5a651eab
comparison
equal deleted inserted replaced
1310:b76927543aaf 1311:fc858abf6b10
1988 static int slice_end(AVCodecContext *avctx, AVFrame *pict) 1988 static int slice_end(AVCodecContext *avctx, AVFrame *pict)
1989 { 1989 {
1990 Mpeg1Context *s1 = avctx->priv_data; 1990 Mpeg1Context *s1 = avctx->priv_data;
1991 MpegEncContext *s = &s1->mpeg_enc_ctx; 1991 MpegEncContext *s = &s1->mpeg_enc_ctx;
1992 1992
1993 if (!s1->mpeg_enc_ctx_allocated)
1994 return 0;
1995
1993 /* end of slice reached */ 1996 /* end of slice reached */
1994 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) { 1997 if (/*s->mb_y<<field_pic == s->mb_height &&*/ !s->first_field) {
1995 /* end of image */ 1998 /* end of image */
1996 1999
1997 if(s->mpeg2){ 2000 if(s->mpeg2){