diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 08c28406564dc2194d8ac1aa666dd670d327f4d2..b17f2825d836a3f9d278f6751ab7537ce2a0daee 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -335,6 +335,7 @@ static int ea_read_packet(AVFormatContext *s,
             break;
 
         /* ending tag */
+        case 0:
         case SCEl_TAG:
             ret = AVERROR(EIO);
             packet_read = 1;