id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
1751,FFmpeg keeps streaming but stream is blank/offline,taqattack,,"Hello. I'm creator of FFsplit project (http://www.ffsplit.com). We have been using ffmpeg on windows to encode and stream videos to CDNs. One of the most annoying issues that popped up was that the stream would suddenly stop but ffmpeg would keep going as if nothing wrong happened. I basically solved this inside FFsplit by reading and detecting improper packet from byte arrays that are sent to it and looking for the incorrect/incomplete packet. But recently I was able to solve this issue inside FFmpeg source code. Here's what I did:

In libavformat/rtmpproto.c, I changed:

{{{
if (size < 11) {
   av_log(LOG_CONTEXT, AV_LOG_DEBUG, ""FLV packet too small %d\n"", size);
   return 0;
}
}}}

to

{{{
if (size < 11 && !rt->flv_off) { // <--- Added ""&& !rt->flv_off""
   av_log(LOG_CONTEXT, AV_LOG_DEBUG, ""FLV packet too small %d\n"", size);
   return 0;
}
}}}

(Source: http://broadcast.oreilly.com/2011/11/flash-media-serverffmpeg-annoy-1.html)

From what I understand, the FLV packet size was bigger than RTMP and this solves it. Checking it inside FFsplit, the improper byte arrays dont show up anymore. I hope someone sees this and incorporates it inside FFmpeg. Thank you!",defect,new,normal,undetermined,unspecified,,,,,,0,0
