diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-10-15 21:59:29 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-10-15 21:59:29 +0100 |
commit | 93d452a4570cf3f4dd81c6c2cab66aa604f39e05 (patch) | |
tree | 608040a2bc928d0dca49aff819a7509fddb8887a | |
parent | b014f51562c06d6451fc8ec35fa9d08209c9852b (diff) | |
download | xine-lib-93d452a4570cf3f4dd81c6c2cab66aa604f39e05.tar.gz xine-lib-93d452a4570cf3f4dd81c6c2cab66aa604f39e05.tar.bz2 |
Quick hack to prevent segfaulting at end-of-stream when this->context == NULL.
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 2742e3f2e..60f2c5d9c 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1194,7 +1194,8 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { if (this->size == 0) { /* take over pts when we are about to buffer a frame */ this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); - this->context->reordered_opaque = ff_tag_pts(this, this->pts); + if (this->context) /* shouldn't be NULL */ + this->context->reordered_opaque = ff_tag_pts(this, this->pts); this->pts = 0; } #endif /* AVCODEC_HAS_REORDERED_OPAQUE */ |