diff options
author | uid45177 <none@none> | 2002-07-05 21:12:32 +0000 |
---|---|---|
committer | uid45177 <none@none> | 2002-07-05 21:12:32 +0000 |
commit | 80265c6e80465990c4ec35feb72429be8ea35e10 (patch) | |
tree | 4947214fc6083dd910f8760810b05e7ff58285d5 | |
parent | 52ae732957764b953b3b2491afda4376ce595c43 (diff) | |
download | xine-lib-80265c6e80465990c4ec35feb72429be8ea35e10.tar.gz xine-lib-80265c6e80465990c4ec35feb72429be8ea35e10.tar.bz2 |
checks to avoid segfaulting with (very) broken streams
CVS patchset: 2217
CVS date: 2002/07/05 21:12:32
-rw-r--r-- | src/libmpeg2/decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index a8b48bb30..7c46f70f3 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -175,7 +175,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture = mpeg2dec->picture; is_frame_done = mpeg2dec->in_slice && ((!code) || (code >= 0xb0)); - if (is_frame_done) { + if (is_frame_done && picture->current_frame != NULL) { mpeg2dec->in_slice = 0; if (((picture->picture_structure == FRAME_PICTURE) || @@ -402,7 +402,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, } } - if (!(mpeg2dec->drop_frame)) { + if (!mpeg2dec->drop_frame && picture->current_frame != NULL) { mpeg2_slice (picture, code, buffer); if( picture->v_offset > picture->limit_y ) picture->current_frame->bad_frame = 0; |