changeset 3384:b1d2c80f2ded libavformat

Fixes NULL pointer dereference CID66
author michael
date Wed, 28 May 2008 00:10:34 +0000
parents 2e9f19e0493b
children 2d7d35d04f9c
files avidec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Wed May 28 00:07:41 2008 +0000
+++ b/avidec.c	Wed May 28 00:10:34 2008 +0000
@@ -650,6 +650,9 @@
                 best_stream_index= i;
             }
         }
+        if(!best_st)
+            return -1;
+
         best_ast = best_st->priv_data;
         best_ts= av_rescale(best_ts, best_st->time_base.den, AV_TIME_BASE * (int64_t)best_st->time_base.num); //FIXME a little ugly
         if(best_ast->remaining)