changeset 4334:376664156fe2 libavformat

return eof/error if only ffm header has been written, should fix #815
author bcoudurier
date Sun, 01 Feb 2009 22:02:57 +0000
parents faf0db68fcda
children e6fb8644af02
files ffmdec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ffmdec.c	Sun Feb 01 21:22:12 2009 +0000
+++ b/ffmdec.c	Sun Feb 01 22:02:57 2009 +0000
@@ -359,6 +359,9 @@
     FFMContext *ffm = s->priv_data;
     int duration;
 
+    if (url_fsize(s->pb) == FFM_PACKET_SIZE)
+        return -1;
+
     switch(ffm->read_state) {
     case READ_HEADER:
         if (!ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) {