workaround to prevent segfault: when using -ve lavc with b-frames write_chunk(1st video frame) gets called with len=-1UL; -1ULl to whomever calls me that way

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18045 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-04-05 20:51:35 +00:00
parent 7d8d007650
commit ecdfed5122
1 changed files with 2 additions and 0 deletions

View File

@ -2436,6 +2436,8 @@ static void mpegfile_write_chunk(muxer_stream_t *s,size_t len,unsigned int flags
if(s->buffer == NULL)
return;
if(len == -1)
return;
pts = 0;
if (s->type == MUXER_TYPE_VIDEO) { // try to recognize frame type...