mpeg12: terminate mpeg2_video_profiles arrays
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 27 Apr 2011 23:42:56 +0000 (01:42 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 27 Apr 2011 23:45:19 +0000 (01:45 +0200)
Make av_get_profile_name() return NULL if no profile is detected.

Fix trac issue #130, fix crash reading file tek3.m2v.

libavcodec/mpeg12.c

index 510a2b0..34958a7 100644 (file)
@@ -2566,6 +2566,7 @@ static const AVProfile mpeg2_video_profiles[] = {
     { FF_PROFILE_MPEG2_SIMPLE,       "Simple"             },
     { FF_PROFILE_RESERVED,           "Reserved"           },
     { FF_PROFILE_RESERVED,           "Reserved"           },
+    { FF_PROFILE_UNKNOWN },
 };