summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2003-02-23 01:22:56 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2003-02-23 01:22:56 +0000
commita0cb8b13c47a49fb6c12a2d6e95a706cdf210fa1 (patch)
tree25af36de32b10d4e7e10c792724d561dc3a0664c
parent7734832d51ad2cda4e45a1538336bfc6e40c83b8 (diff)
downloadxine-lib-a0cb8b13c47a49fb6c12a2d6e95a706cdf210fa1.tar.gz
xine-lib-a0cb8b13c47a49fb6c12a2d6e95a706cdf210fa1.tar.bz2
Fix crash when opening ffmpeg decoder fails
CVS patchset: 4259 CVS date: 2003/02/23 01:22:56
-rw-r--r--src/libffmpeg/xine_decoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 2a89567be..14d9579da 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.96 2003/02/22 17:32:31 guenter Exp $
+ * $Id: xine_decoder.c,v 1.97 2003/02/23 01:22:56 jstembridge Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -151,6 +151,7 @@ static void init_video_codec (ff_video_decoder_t *this, xine_bmiheader *bih) {
if (avcodec_open (this->context, this->codec) < 0) {
printf ("ffmpeg: couldn't open decoder\n");
free(this->context);
+ this->context = NULL;
this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0;
return;
}