rtmp: Don't try to do av_malloc(0)
authorMartin Storsjö <martin@martin.st>
Wed, 25 May 2011 16:08:29 +0000 (19:08 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 25 May 2011 19:00:42 +0000 (22:00 +0300)
commit271c869cc3285dac2b6f2663a87c70bf3ba2b04f
tree59ef573dc2fe17b41f8e36989b4c141353ab9f04
parent67540af7baa5c4064753861be217ac8f7c8df997
rtmp: Don't try to do av_malloc(0)

Some received packets can have size 0. The return value from
av_malloc(0) may be NULL, which is ok if the size was 0. On
OS X, however, the returned pointer is non-null but leads to
crashes when trying to free it.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmppkt.c
libavformat/rtmpproto.c