Merge remote-tracking branch 'qatar/master'

* qatar/master:
  flacdec: read attached pictures.
  lavf: don't segfault when a NULL filename is passed to avformat_open_input()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-06-16 23:22:37 +02:00
2 changed files with 124 additions and 1 deletions

View File

@ -618,7 +618,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
}
s->duration = s->start_time = AV_NOPTS_VALUE;
av_strlcpy(s->filename, filename, sizeof(s->filename));
av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename));
/* allocate private data */
if (s->iformat->priv_data_size > 0) {