Skip to content

Commit

Permalink
fix strstr crash
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Oct 13, 2014
1 parent 0033b94 commit 9fd3e23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/subtitle/SubtitleProcessorFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ QStringList ffmpeg_supported_sub_extensions()
QStringList exts;
AVInputFormat *i = av_iformat_next(NULL);
while (i) {
if (strstr(i->long_name, "subtitle")) {
// strstr parameters can not be null
if (i->long_name && strstr(i->long_name, "subtitle")) {
if (i->extensions) {
exts.append(QString(i->extensions).split(QChar(',')));
} else {
Expand Down

0 comments on commit 9fd3e23

Please sign in to comment.